in reply to Re^2: search an array
in thread search an array

This is fine provided you know the values of all the $xpid (there could be thousands) prior to issuing the SQL. The problem is I don't. This means that I would have to issue a select every time I search for a spid which isn't as cost effective as getting the whole list up front and letting Perl do the search (I know ... I've tested it). It's my fault for not expressing the question in as much detail as perhaps I should

Replies are listed 'Best First'.
Re^4: search an array
by dsheroh (Monsignor) on May 26, 2006 at 21:19 UTC
    Just to make sure all the bases are covered, when you tried querying for each $xpid instead of slurping the entire database into memory, did you use a placeholder so you could prepare the statement once, then execute it repeatedly? If not, you might want to re-try your test, as it makes a big difference on an often-run query if it doesn't have to be re-prepared each time.