On 3/2/07, Vassilis Aggelakos <[EMAIL PROTECTED]> wrote:
>
> Definetly I have to benchmark this.
> As a third option I have thought to create a mechanism to scan these 50
> records and to hit 50 indivindual queries in the server and then to create a
> local union select with all these results. What about this?
>
As always, the standard "your mileage may vary" disclaimers apply.
Three conversations with the back end (create temp table, populate,
select matching records) ought to be faster than fifty "select this
one record" queries and the code to glue them together on the local
side. But whether that "faster" matters to you depends on the
application. If your backend doesn't care about the traffic (or the
temp tables take up more valuable space than the 50 queries consume
valuable CPU time), try it out.
For small sets, you can also use the IN clause to select the records
you want (in other words, SELECT * from DETAILS where ProductID IN
("123", "234", "456", "567") may work for you, depending on the limits
of the backend.
--
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.