main logo
Subject: Re: SQL speed
Author: Geof whitham
Posted: 2001/10/09 07:17:21
 
View Entire Thread
New Search


Hi Graeme,
I don't have access to such a large table, but my thoughts would be to check if the sql is being optimized have you a index/filter for Not Deleted() = .T. for example. This may explain.

Just a thought!

<i><font color="#663300">If I have a large table - 1 million records for my current invoice codes file for example - and I do a SELECT from that table based on client number it takes 20 seconds.
Consider however:
Load the view with NODATAONLOAD = .T.
Take the table, set the order to client_id, seek the Client then as with Foxpro2.6
do a
scan while.... ,
scatter memvar,
gather memvar (to the view),
endscan
It is very fast (< 1 second )
Is this something I have to put up with with SELECT statements or am I missing something?
I realise I need this method to port across to SQL Server etc.. but I am finding it hard to believe that hard coding in the old way is so much faster than the "New" way. </font></i>


 
©2001 Geof whitham
<-- Prior Message New Search Next Message -->