Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : "Like" operatorSearch Forum

Forum Home > FlexODBC - ODBC Driver for DataFlex Embedded DBMS > FlexODBC SQL Support Forum

 New Topic 
 
 Post Reply 
[1]  
 "Like" operator 
 Author   Message 
  Louisa 
  
 Group: Members 
 Posts: 10 
 Joined: 2007-05-29 
 Profile
 Posted : 2008-02-01 01:44:17

Just wondering why my query through flexodbc :

select column2 from table where column1 like '%value'

took forever to return. column1 is an indexed column. the table has about 2.6 millions of rows and there are 2 such records in the table...

Any suggestion to make it work?

Thanks,

Louisa

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-02-01 08:26:53

The use of Like means FlexODBC needs to scan the whole table from start to end to produce the result. You need to limit the query to a smaller set of useful records like: 

select column2 from table where column1 like '%value'  and Date => {d '2008-01-01'}

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to