sql speed
Robert Brenstein
rjb at robelko.com
Sun Feb 27 20:37:53 CST 2005
>>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
I would think that using extra field actually simplifies the code
significantly and gives more flexibility, but of course, I have no
clue about specifics of your project. I may be wrong, but I think
that an sql searching for a specific value of a field will always be
faster than one extracting a long list of recids (unless Ruslan
manages to special-case this having the engine recognize that it is
just a recall of a list of ids).
Robert
More information about the Valentina-beta
mailing list