On Wed, Jan 5, 2011 at 5:47 PM, Sylvain Pointeau <[email protected]
> wrote:

> in my opinion, other than oracle, the vectors should be filled for each row
> by call backs.
>
> sql << "SELECT A1,A2,A3 FROM TABLE_1", into(a1_vector), into(a2_vector)
>
> would it be possible that for each row, we call a function to fill
> a1_vector and another function for a2_vector?
>
> we would not need to cache the results neither to have everything as a
> string.
> and it would be a shortcut for the hand-coded loop, but would not be less
> efficient.
>
> could we have special case for db other than oracle?
>
>
>
I would propose to first do a benchmark to see if this is even worth it.
I assume that fetching the data from the database should be far more time
comsuming than some extra conversions and in memory copies. At least for
databases so large they can't be cached efficiently. In that case
optimizations could be premature.

A simple benchmark could be:
Use the backends own api in the optimal way and then use soci for the same
task. Possibly with simple and complex tables. Don't forget to account for
caching effects.
I would be curious about the results.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to