cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Øyvind Harboe" <>
Subject Memory usage and select statements
Date Mon, 30 Jun 2008 08:54:59 GMT
An SQL statement includes a list of which columns to fetch for
the query.

Consider a table "book" with three columns, id(pk), title(<100 chars)
and content(the entire text of the book).

SELECT id, title FROM book

If one of the columns are big and rarely used, then it makes little
sense to transfer it to the client from the database for every
query. E.g. above the entire text of the book is left out.

The difference in memory usage can be quite dramatic.

Can I do the same w/Cayenne?

Can I have the columns fetched on-demand?

I'd like to avoid hardcoded SQL templates obviously.

SelectTranslator.createSqlString() unconditionally adds all

Øyvind Harboe
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer

View raw message