[Valentina] M:M problems

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Jan 20 19:06:39 CST 2003


on 1/20/03 6:53 PM, Eric Forget at forgete at cafederic.com wrote:

>> To get the same functionality in SQL:
>> 
>> void FindPersonsOfGroup( FBL_REC_ID inGroupRecID )
>> {
>>   char q = "SELECT Person FROM GroupPerson WHERE Group = %d";
>>   char query[256];
>> 
>>   sprintf( query, q, inGroupRecID );
>> 
>>   VDK_Cursor* curs = SqlSelect( query );
>> 
>>   // Now you have cursor with ONE field that in fact contains
>>   // RecIDs of persons you need. Just iterate it.
>>   
>>   ....
>> }
> 
> I don't care using SQL, how slower is it?

Note, that in fact SQL engine in background use the same BitSets and
arraySets to do work.

Note, that when you do query to several tables, SQL is great.
Of course manually you also can do great things :-)

And of course the main overhead of SQL -- strings.
You need build them, kater parser parse them...

Steve once have mention that manual work give him 10-20 times speed up.
But I have not check this report. May be he was wrong.

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list