Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: SQLite and large number of parameters

by menth0l (Monk)
on Dec 10, 2012 at 13:07 UTC ( [id://1008096]=note: print w/replies, xml ) Need Help??


in reply to Re: SQLite and large number of parameters
in thread SQLite and large number of parameters

I'm afraid it's more complicated than that... These values come from bk-tree (i search it for similar strings) and their number varying from few to couple of thousands values.
  • Comment on Re^2: SQLite and large number of parameters

Replies are listed 'Best First'.
Re^3: SQLite and large number of parameters
by Jim (Curate) on Dec 10, 2012 at 19:26 UTC

    I agree with bart. I don't think it's as complicated a problem as you're making it. You have a relational database. You have a problem that is trivially solved using a relational database. Just INSERT the values INTO temporary tables and either use WHERE EXISTS (if SQLite supports it) or INNER JOIN on the tables instead. Don't knock yourself out trying to work around the limitations of the WHERE … IN clause. It simply doesn't scale to your requirements.

    Jim

Re^3: SQLite and large number of parameters
by Anonymous Monk on Dec 10, 2012 at 16:40 UTC
    Then you are going to have to develop some kind of algorithm. Perhaps you could stuff those "couple thousand values" into a temporary table and then execute an INNER JOIN against it. Like it or not, you are forced to construct a different approach to your problem.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1008096]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-20 05:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found