On 2/5/07, Shannon -jj Behrens <[EMAIL PROTECTED]> wrote: > On 2/5/07, Christoph Haas <[EMAIL PROTECTED]> wrote: > > On Saturday 03 February 2007 08:01, dds wrote: > > > On Jan 29, 11:54 pm, Christoph Haas <[EMAIL PROTECTED]> wrote: > > Are you sure? In the background the orm.py is creating a lazy mapping that > > is only requesting rows from the database when they are needed. As far as > > I understand even that .select() doesn't pull anything unless you read > > from it. And if you read just a slice the database would *then* start a > > query with a certain LIMIT. > > > > > The point of giving > > > it a real query object is that it should use limit and offset to > > > select only the elements from the DB to make the current page, not > > > carry it all around in memory. > > > > True, but isn't that also true for .select()? I'm really not sure because > > I'm a newbie to SQLAlchemy. Of course a "nakes .select()" is bullshit > > because it does not contain any selection criteria. > > Well, if you tell SQLAlchemy to echo queries to STDOUT, you can check > that it's doing what you think it's doing. > > Best Regards, > -jj
I ran into an issue when trying to use sqlsoup with the pagination stuff where sqlsoup's select was fetching the entire result set, and then the pagination object was returning a slice from that. I ended up having to pass in limit and offset to the select statement manually. Does plain old sqlalchemy behave differently? Cheers, Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---