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

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.