custom web design Rotating Header Image

how to make your SQL database run

SQL database in the application we frequently fall into a entice, that is also centered on the results could be correct although ignoring the emergence of distinct guidelines for the existence of functionality distinctions between the estimates, this variation in efficiency in big or complex database atmosphere (this kind of as on the web transaction processing OLTP or selection support program DSS) was especially evident in the.&nbspI invented the apply in the workers, typically poor SQL database indexing from the inappropriate style of the connection is not essential and can not be completely optimized wITe clause.&nbspThey stopped proper in the optimization, its speed has substantially elevated! The subsequent a few locations I will summarize each and every end:

SQL database in the software we usually drop into a lure, that is as well focused on the final results may possibly be appropriate although ignoring the emergence of diverse tips for the existence of performance differences in between the estimates, this big difference in performance in huge or complex database surroundings (this sort of as on the internet transaction processing OLTP or decision assistance technique DSS) was notably evident in the.&nbspI invented the practice in the staff, often inadequate SQL database indexing from the inappropriate design of the connection is not essential and can not be totally optimized wITe clause.&nbspThey stopped correct in the optimization, its speed has significantly improved! The adhering to a few locations I will summarize each quit:
A lot more tough to visually describe all the examples in the SQL database running time is tested, not a lot more than a single 2nd of all that is (&lt1 2nd).

Test Surroundings -
Host: HP LH II
Frequency: 330MHZ
Memory: 128 MB
Operating Method: Operserver5..4
Database: Sybase11..three

First, the index is not logical design and style
Example: the table document with 620,000 lines, Look in the index is not the very same, the adhering to operation of several SQL databases:

one. The date on the development of a non-clustered indexes had been
Organizing:
date on a significant amount of repeat worth, the non-clustered index, the information is physically stored in information random web page, appear at the range, the need to have to run a table scan to locate all the lines inside of this range.

2. The date on a cluster index
Organizing:
In the clustered index, the info in bodily purchase in the knowledge page of press, and repeated worth are arranged with each other, Yin Er Chazhao O’clock in the area, not Cheng Ji Xian Zhao Dao that variety from points in and to that extent 只 scan info page stay away from large-scale scanning, increase the query speed.

3. Socate, date, amount, on a mixture of the index
Planning:
This is not a extremely logical blend of the index, because of its major column is socate, NO · one and the 2nd SQL database does not reference socate, so do not use the index 3rd SQL database apps the socate, and references All columns are incorporated in the mix of the index, an index covering the formation, so it is unusually quick tempo.

four. The date, socate, amount on the blend of the index
Planning:
This is a logical mixture of the index.&nbspIt will date as the leading column, so no score for every SQL database utilizing the index, and NO · 1 and the 3rd formed the SQL database indexing coverage, and therefore achieve the optimal performance.

5. Summary:
By default, the index set up below the non-clustered index, but occasionally it does not do the best index logical design and style of the establishment of different queries in the preparing and Yuce on.&nbspIn standard:

①. There are a whole lot of repeat worth, and typically the scope of inquiry (in with,&gt, &lt,&gt=,&lt =) and order by, assemble by addition of the column, the index may be arranging to set up cluster

②. Usually simultaneous accessibility to several columns, and every single column include a duplicate worth may possibly be planning to create mix index

③. Combined Index to kind as far as possible the important to query the index coverage, the major column is the most usually determined column.
  • Page 1:
  • Web page 2:
  • Page 3:
  • Web page 4:
  • Web page 5:
  • A total of 5.

    Java programmers need to know a few open-source agreement

    The tasks of today to write some of the relevant agreement with the open source protocol description, so some information in the online search for information, listed below a few of the more common open source license:
    Mozilla Public License
    MPL License, to allow free re-released, free changes, but requires the modified code belongs to the software initiator. The authorization to maintain the interests of commercial software, which requires the software be modified based on free contributions to the copyright to the software. In this way, all the code around the software may have initiated the development rights are concentrated in the hands of people too. But the MPL is to allow changes to be free to use. MPL does not require software on the link.

    Creating a plugin for jQuery

    Learn how to create a plug-in for jQuery from scratch – the basics, options, compatibility and examples.

    The Basics
    A plugin is written as a method or function. 

    How to link items to a UserControl – WPF

    In this article we will see how to perform the binding controls within a UserControl to a WPF application.

    And accomplish this task using:

    • The DataContext property of the user control.

    Reviewing concepts

    A UserControl is a control created from existing controls, adding these controls into a single control in order to optimize your code. It is indicated when you realize that there is a loop in the structure of which involved controls so that if you create a composite control, these controls with the data manipulation is facilitated.

    (more…)

    Java for the elimination of implementation inheritance and interface programming

    Clarify the occasion in a hurry to eliminate implementation inheritance and interface programming for the two major problems that is not an easy task, especially given the level of awareness of their own. Frankly, this is a “same old stuff,” the article, but “left-” and indeed bad speculation. Therefore, after reading this article, you have to critically accept (reject) my point of view, although my view is the view from the others.
    Inheritance is a very important object-oriented concepts. If you take into account the Java language features, inheritance is divided into two types: interface inheritance and implementation inheritance. This is only technical issues, even if the C + + interface does not exist in the concept, but it’s actually the equivalent of virtual base class interfaces. For OO beginners, they hope their program when a large inheritance, because it looks OO. But the abuse of inheritance is a lot of problems, though sometimes we have to use inheritance to solve the problem.
    Compared with interface inheritance, implementation inheritance issues to be more, it will bring more coupling. But interface inheritance is in question, which is inherited itself. Many of the issues for implementation inheritance to achieve on its own, so here focused on achieving the question of succession.
    For example (in this case it’s old). I want to implement a Stack class, I assume, to select Stack class inherits from ArrayList class (you can also think I would like to OO nature of laziness or for some); now has a new requirement, need to implement a thread-safe Stack , I defined a ConcurrentStack class inherits from Stack and Stack covers the portion of the code.
    Because Stack inherited from ArrayList, Stack had outside exposed to all the public methods of ArrayList, even if some of the methods which it may be unnecessary; even worse, some of these methods may alter the state of Stack, The Stack and knowledge of these changes, this will cause the logic errors Stack.
    If I want to add new ArrayList methods, this method is likely to undermine it, logically derived class Stack, ConcurrentStack. Therefore, the base class (parent class) Add Method (modified code), you must check whether these changes will affect the derived class; if an impact, then the derived class would have to make further changes. If the class inheritance system is not a complete person, or someone else’s code to modify the case, is likely to arise because of inherited imperceptible BUG.
    Issues still at stake. We sometimes see such a base class, some of the ways it is an exception, which means that if the derived class to support this approach to rewrite it, or the same as the parent class throws an exception that it does not support this method call. We can also see it as a variant of the parent class is abstract, but not all sub-classes to support this method, the method does not support an exception on the way to a position. This approach is very friendly and very safe, they can only run when the “lucky catch”, and many slipping through the net of the unusual method may one day suddenly, people know what to do.
    Rise to the above question is very important because the base class and derived class coupling between. Base class is often made only small changes, but they had to reconstruct all the derived classes, this is the infamous “fragile base class” problem. As the relationship between classes exist, so coupling is inevitable and even necessary. But in doing OO design, in the event such as the base class and derived class relationship between the strong coupling, we will consider consider whether it must be a succession? Is there a more elegant alternative to other options?
    If we must pedant, you will see a lot of books this principle: If two classes are IS-A relationship between, then the use of inheritance; if between the two classes is Has-A relationship, then use the delegated . Very often this principle is applicable, but the IS-A and not as an absolute reason to use inheritance. Sometimes in order to eliminate problems caused by coupling, using the method of appointment and other details will be better encapsulation. Succession of external and down sometimes too much information exposed in the GOF design patterns, there are many models purpose is to eliminate inheritance.
    On when to use inheritance, an important principle is to determine whether the method can be shared. For example DAO, you can set common CRUD methods in an abstract DAO, the specific DAO are derived from the abstract class. Strictly speaking, the abstract and derived DAO DAO implementation does not have IS-A relationship, we just to avoid repeating the method definition and implementation of this technology to make the choice. It can be said, using the interface or abstract class is the principle that if the contents of multiple methods of derived classes with no common place, it will use the interface as the abstract; If more than one method of derived classes with a common place, it will use the abstract class as abstract. When this principle does not apply to interface inheritance, if there is interface inheritance, it will correspondingly have implementation inheritance (base class is more abstract class).
    Now to talk about Interface-oriented programming. In many agile methods, for interface programming has always been masters repeatedly emphasized. Interface-oriented programming, in fact, an abstract-oriented programming, the abstract and the concrete realization of phase separation. This principle allows us to have a higher level of abstraction model, in the face of the demands of changing, Zhi Yao abstract model so the good, Xiugaidaima Jiuyao much easier. Interface-oriented programming, but do not have to mean an interface corresponds to a class, too many unnecessary interfaces may also bring more of the workload and maintenance difficulties.
    Compared to inheritance, OO concepts in multi-state to be more important. An interface can be related to multiple implementation class, for the declared interface type of method parameters, class fields, Ta Men Shixian class of more than easy to extend, stable, multi-state the benefits of this Yeshi. If I were to achieve the class as a method parameter defines a method void doSomething (ArrayList list), but if the leader some day find a better use ArrayList as LinkedList, I would have to be reconstructed by the void doSomething (LinkedList list), corresponding call this method in all areas modify the parameter type (unfortunately, I could not even object to create is used ArrayList list = new ArrayList () method, 
    which will greatly increase the workload of my changes). If the leadership they feel better with a list stored data set is good, I will once again reconstruction method, but this time I am smarter, I will approach defined as void doSomething (Set set), a way to create object Set set = new HashSet (). But this is still not enough, if the leaders also requested the list will be set back to how to do? So I should be reconstructed by the void doSomething (Collection collection), Collection of the highest degree of abstraction, easier to replace the concrete implementation class. Set List, or even the need for natural features, I can do to solve the problem down to type conversion, although this is not safe.
    Interface-oriented programming is to hide the most important values to achieve, to abstract the implementation details instead of opening up packages, package it for the Java EE in the framework of hierarchical design and design is especially important. But even when used in the programming interface, we also need to correspond to interface and implementation, which leads to the question how to create objects. Design model is created, single cases, the factory method (template method), Abstract Factory and other patterns are good solutions. Inversion of Control is now popular (also known as dependency injection) model is based on a statement to connect the abstract and implementation, which not only reduces the monotony of the factory class is also easier to unit test.
    Sum up the bar. Although I tried to refute a bad advocate interface inheritance is good, but it is not absolute. Abuse of inheritance, misuse of interfaces will cause problems. Java EE developers to do a lot of friends complain about DAO, Service in the implementation of an interface method of a class, although they seem to appear to have become one of the industry’s best practices. May exclude interfaces make programs more “thin” some, but “thin” and necessarily “good”, need to project specific circumstances. On the inheritance and interface best practices, Tell me what you still need its own accumulated experience and summarized.
    Related Posts Plugin for WordPress, Blogger...