Il giorno giovedì 11 settembre 2014 18:39:24 UTC+2, Jonathan Vanasco ha 
scritto:
>
> i once thought about extending SqlAlchemy to handle this issue behind the 
> scenes, but each database treats `IN()` differently.  for example: oracle 
> maxes out at a number of elements, while mysql maxes out based on the size 
> of the overall statement (which is configured on the server).  it's too 
> much work to limit this in sqlalchemy, as these limits change across 
> servers.  [ i forget what postgres maxed out on, i think it was a hard 
> number too.]
>
> the workaround I used was to just build a query-base, and then run 
> multiple selects with a single `IN` within a for-loop which appends to a 
> list.  i found that performance to be much better than chaining multiple 
> `IN()` with `OR`
>
 
My problem is to find a dataset of more than 999 records and sort all 
through ORDER BY statement. How can I use multiple selects and order all 
records?

I try to explain my problem:

I have a gui where I display all the records on my table. Then I make a 
search and I find 1500 records. Then I want to order the current dataset 
(1500 records) by some parameter, so I pass to my function the list of 1500 
records ID which will be found the records through the IN() query with the 
ORDER BY statement. 

Now I don't understand how I can find more than 999 records in sqlite and 
sort the records through ORDER BY. What strategy I can use? Suggestions?

Thanks a lot!
Luca

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to