The plan for this particular case (two data conditions) is:
PLAN JOIN (C5 INDEX (IX_PV_LOOKUP_
(IX_DV_PV_PV)
The query processing starts from C5. This can be a good or bad
choice. Because IX_PV_LOOKUP_
than one row is found in C5. But the join to C4 (DV_PV) can produce
hundreds of thousands of rows indicating that very many object
versions meet this condition. This fact can kill the overall query
performance because these rows are used in joining to C2 (DV_PV) and
finally to C3 for checking the second (timestamp) condition. If the
initial guess is bad, the database is subject to a big amount of
index seeks even though there are a few results in the result set.
Hopefully you understand this query structure. If there were three
data conditions instead of two, performance problems could be even
worse because of more joins involved.
Timo
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
No comments:
Post a Comment