Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Database


    

Blue Forest http://www.lslnet.com at 11:08 on July 8, 2006


SELECT sentence, please master guiding

In Sybase, as a multi-table joins inquiry, the FROM and WHERE clauses of the table were the order of the order of conditions the impact of query performance. How do make inquiries has been optimized?

Seems to be no relationship, Sybase System optimization devices will automatically connect method. Showplan can see inquiries.

Indexing is the key issue.

Sybase System's plan to enact personal feeling is not good, it's clear that there are indexing field, not just that he is a strange


Query plan is not just depend on whether there are indexes, while many factors can affect it


: Oops : too deep. Ah there's no point in detail

1017of said okay! Figuratively
In table with a field a, b, c, d, Index (a, b)
Where = select * from a 'During his inspection tour' and d = '00'
Or where b = '000' and c = '000' no way to use index of the country.


This is the ORACLE (in which the rule-based optimizer) :
ORACLE parser from right to left in accordance with the order in the FROM clauses table, and therefore wrote FROM clauses in the final table (Table driving table basis) will be the first to deal with. Table FROM clauses contained in many circumstances, You have to choose at least a few records of the table as a basic table. When dealing with a number of Oracle table, we will use classification and the linking of their merger. First, a scanning resolution (FROM clauses of the final table that) the records classified, and then a second scan (FROM clauses last second table) Finally, all retrieved from the second table with a record of the table with appropriate records.


WHERE Clause of the sequence
ORACLE WHERE clauses using bottom-up analysis in the order, according to this theory, in other written form to be a link between WHERE conditions, which can filter out the largest number of conditions must be recorded in writing at the end of WHERE clauses.

So ask ourselves what is the situation in Sybase?

-->
Certainly, but I have encountered such a situation :
In table with a field a, b, c, d, Index (a, b)
Select * from a where a = '000' and b = '000'
Plan goes on show useless Index

If a few records, do not seem to be indexed. Select * I came across a situation when the index is used, but their use count (TLC) after full implementation Retrieval, and later stated in the index will be forced to select ok.



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com