Re: Laziness

[prev] [thread] [next] [Date index for 2004/07/15]

From:
Subject: Re: Laziness
Date: 11:36 on 15 Jul 2004
At 03:54 2004-07-14, johanl@xxxxxxxxx.xxx wrote:
> I'm sorry if I was unclear. I was expecting all columns to be fetched
> since I thought they would all be in the "All" group (since I set it
> explicitly). But the DBI profile report displayed selects with individual
> columns, as well as selects with all columns.

This didn't have anything to do with laziness after all. Sorry for the
misdirection.

After reading some more DBI traces, I see that the selects of individual
columns is from the "update" method. Just me not reading the manual enough
times. It's a bit much to digest the first time around while trying to get
everything to simply work :)

<http://search.cpan.org/~tmtm/Class-DBI-0.96/lib/Class/DBI.pm#update>;
"After the database update has been executed, the data for columns that
have been updated are deleted from the object. If those columns are
accessed again they'll simply be fetched as needed. This ensures that the
data in the application is consistent with what the database actually
stored."

While I can see why this is an appropriately defensive move, I'm thinking
it might become an unnecessary performance problem in an intense OLTP
application, at least for particular tables and columns (and I realize
CDBI may not be the right tool for that particular job but it would be
nice if it could be, given it's usefulness in other ways).

Are there any ideas in the general area of making the select-after-update
semantics optional like other features? It's not on my nice-to-have-list
now, but it may end up there in the future.


/J



Laziness
Johan Lindstrom 19:03 on 12 Jul 2004

Re: Laziness
Tony Bowden 20:43 on 13 Jul 2004

Re: Laziness
01:54 on 14 Jul 2004

Re: Laziness
Tony Bowden 08:23 on 14 Jul 2004

Re: Laziness
11:36 on 15 Jul 2004

Re: Laziness
Tim Bunce 13:51 on 15 Jul 2004

Re: Laziness
19:39 on 15 Jul 2004

Re: Laziness
Tim Bunce 21:10 on 15 Jul 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52