Subject | Firebird cannot optimize a query when |
---|---|
Author | Johan van Zyl |
Post date | 2004-04-02T04:46:58Z |
FROM: NewsServer - discuss.softvelocity.com NewsGroup comp.lang.clarion
I'd like to commend you for such clearly laid out queries.
Provided you've done your homework in the backend with indexes, it's
appears to me that Firebird cannot optimize a query when the ORDER BY spans
tables. This is a common weakness of most RDBMSs. ORDER BYs that span
tables are also very common when tables are linked with artificial
information. Most people prefer to use artificial information, as do I.
I don't think the prognosis is good, but here is something that you could
try:
Setup UNIQUE indices:
VPCLI.MatchCode ASC, VPCLI.NumLoc ASC
VPVIL.NumInt ASC, VPVIL.NumCli ASC
Let me know.
Regards,
Jack T.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.647 / Virus Database: 414 - Release Date: 2004-03-29
[Non-text portions of this message have been removed]
I'd like to commend you for such clearly laid out queries.
Provided you've done your homework in the backend with indexes, it's
appears to me that Firebird cannot optimize a query when the ORDER BY spans
tables. This is a common weakness of most RDBMSs. ORDER BYs that span
tables are also very common when tables are linked with artificial
information. Most people prefer to use artificial information, as do I.
I don't think the prognosis is good, but here is something that you could
try:
Setup UNIQUE indices:
VPCLI.MatchCode ASC, VPCLI.NumLoc ASC
VPVIL.NumInt ASC, VPVIL.NumCli ASC
Let me know.
Regards,
Jack T.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.647 / Virus Database: 414 - Release Date: 2004-03-29
[Non-text portions of this message have been removed]