Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: SQLite and large number of parameters

by menth0l (Monk)
on Dec 10, 2012 at 13:07 UTC ( #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
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.
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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-09-22 06:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (182 votes), past polls