>I have the following code that takes forever to run. Can anyone suggest ways of speeding up the process?
>
>select courseid,classid,studentid,birthdate,firstname,middlei,lastname,address,city,state,zip;
>from student;
>where empty(web_exp);
>into table c:\tempweb
>
>The database has over 390000 records. For test data, I'm looking for 42 records and it's taking so long. Should I set an index?
>
Hi Sunshine
DEFINITELY create an index on "web_exp" and see what effect that has.
Next you may need an index on DELETED() to speed things up - that may, or may not, help - but is worth trying as a second pass (there are too many possibilities here to be presecriptive about that one).
Also try and avoid using functions in your filter expressions, use exact comparisons they are usually faster. But you need to check the setting of SET ANSI because that can affect how things behave (see the help file for details)
So instead of
>where empty(web_exp);
use WHERE web_exp == ""
----
Regards
Andy Kramek