If the object has 22 fields, where I only need two to display, and client is connected to the server with a relatively slow connection (dsl) there will be a lot of overhead. Don't you think?

Koen

On 31-aug-2005, at 4:42, Kevin Dangoor wrote:

On 8/30/05, Koen Bok <koen@mac.com> wrote:

Hello. I am writing a server-client application with sqlobject and
pyobjc. To make it as efficient as possible I would like to tell
sqlobject which fields to fetch.


I would be surprised if the number of fields being fetched had a
significant bearing on the performance of the app.


p = Person.selec() always results in 'SELECT * FROM ...'

I would like it to be:

'SELECT name,email,etc FROM...'

How can I do that? I could not find this in the docs and in the Wiki.


SQLObject gives you an object front end for your relational database.
To do that, it gives you fully populated objects back, so that you can
pass them around and do what you need to do with them.

It *could* conceivably allow you to select fewer fields and then
generate an error if you try to access one of the fields that wasn't
selected. However, I'm not sure if the performance gain is worth the
added complication (premature optimization is the root of all evil,
after all).

Kevin


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss


Download my V-Card