On Sat, Feb 06, 2010 at 04:54:07PM +0100, Petr Jake?? wrote:
> MyTable.select() method results to the
> SELECT my_table.* FROM my_table (or ALL column names are named explicitly)
> 
> Is there a way to retrieve just some rows, not all of them.

   Some columns, you mean? No, SQLObject instance can only select all of
the column or none of them. Perhaps "none of them" is what you whant. Set

class sqlmeta:
    cacheValues = False

   Now every attribute access executes a separate SELECT query just to
select this column from the table. If you read only a few attributes there
will be only a few SELECTs.
   But I doubt it is faster or takes less memory than one wide SELECT. I'd
very much like to recommend to experiment and find out what way is really
faster.

Oleg.
-- 
     Oleg Broytman            http://phd.pp.ru/            p...@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to