sql speed

jda jda at his.com
Sun Feb 27 13:14:22 CST 2005


>
>Have you  about having an ancillary field to define sets? I mean a 
>field either boolean (if a single set possible) or byte (if more) 
>that is preset to 0 (using UpdateAllRecords) to indicate a given 
>record is not part of the set. This allows you to mark and unmark 
>records (individually or whole cursor) and then do a search on that 
>field at the end to create your big cursor. It would also eliminate 
>checking for duplicates.
>
>In other words, if I understand your problem correctly, the logic would be
>
>reset the marker field for all records that are not reset
>do search 1
>set the marker field in whole cursor
>do search 2
>set the marker field in whole cursor
>...
>search for records with marker field set
>

Hi Robert,

Thanks for the suggestion. Yes, that would work. In fact, I already 
use an approach like this to keep track of an ordered set of records. 
I'd like to avoid adding yet another field to my database for this if 
I can (I would if I had to), and think the approach I have used 
should work more quickly than it does (my approach is also more 
flexible, because I can change it in code anytime I want to without 
worrying about backward compatibility). The recid search is terribly 
slow right now (for 8300 recIDs it takes 30 seconds or so) and I'm 
sure that can be improved (I've sent a db and the search to Ruslan).

Jon


More information about the Valentina-beta mailing list