Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
Index perfomance when using function within SQL |
Tue, Mar 4 2008 1:19 PM | Permanent Link |
"Halim Boumedjirek" | Consider the following queries:
Select * from "customer" where "email"='MYEMAIL@DOMAIN>COM' and Select * from "customer" where UPPER(email)='MYEMAIL@DOMAIN.COM' As you can see, the only difference is the UPPER function. Also, the customer table has an index on the email field. I tested both queries and I found out that the second query is not using any index. it takes forver to execute. What should I do to speed it up? Please note that I tried to set my index case-ins property to true. It gave me the same results. Thank you, -Halim |
Tue, Mar 4 2008 2:40 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Halim,
<< I tested both queries and I found out that the second query is not using any index. it takes forver to execute. What should I do to speed it up? Please note that I tried to set my index case-ins property to true. It gave me the same results. >> Use this query with a case-insensitive index in order to have it be optimized: Select * from "customer" where UPPER(email)=UPPER('MYEMAIL@DOMAIN.COM') -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Mar 4 2008 2:44 PM | Permanent Link |
"Halim Boumedjirek" | That did it.
Thank you, -Halim "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:DA2FB2B9-051B-4902-9EF7-F2B27C48677B@news.elevatesoft.com... > Halim, > > << I tested both queries and I found out that the second query is not > using any index. it takes forver to execute. What should I do to speed it > up? Please note that I tried to set my index case-ins property to true. It > gave me the same results. >> > > Use this query with a case-insensitive index in order to have it be > optimized: > > Select * from "customer" where UPPER(email)=UPPER('MYEMAIL@DOMAIN.COM') > > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |