Subject | Re: [firebird-support] SQL - performance |
---|---|
Author | David Johnson |
Post date | 2004-08-21T04:29:34Z |
Just looking at the query, both will be very poor performers. Both will
require the SQL engine to evaluate the columns for every row in the
table by brute force.
Without knowing the business function you are trying to perform, I can't
make any but the most vague suggestions of how to improve things.
On Fri, 2004-08-20 at 14:55, João Luiz (Unifar) wrote: Hi ALL,
I'm using FIREBIRD 1.5 and I have a question.
What SQL has the best performance ?
1) select * from planoconta where nivel like '01.01%'
or
2) select * from planoconta where substring(nivel from 1 for 5) =
'01.01'
Thanks for your attention.
---------------------------
João Luiz
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
ADVERTISEMENT
click here
________________________________________________________________________
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
require the SQL engine to evaluate the columns for every row in the
table by brute force.
Without knowing the business function you are trying to perform, I can't
make any but the most vague suggestions of how to improve things.
On Fri, 2004-08-20 at 14:55, João Luiz (Unifar) wrote: Hi ALL,
I'm using FIREBIRD 1.5 and I have a question.
What SQL has the best performance ?
1) select * from planoconta where nivel like '01.01%'
or
2) select * from planoconta where substring(nivel from 1 for 5) =
'01.01'
Thanks for your attention.
---------------------------
João Luiz
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
ADVERTISEMENT
click here
________________________________________________________________________
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.