Re: loading many objects from one query

[prev] [thread] [next] [Date index for 2004/09/16]

From: merlyn (Randal L. Schwartz)
Subject: Re: loading many objects from one query
Date: 17:10 on 16 Sep 2004
>>>>> "Perrin" == Perrin Harkins <perrin@xxxx.xxx> writes:

Perrin> There's a bit more to it.  You would need to avoid hitting the
Perrin> database in places where it is currently hit, and you would
Perrin> also need to cache the results of searches to really make this
Perrin> useful.  Nothing terrible though.

Perrin> There's really nothing big holding this back at the moment
Perrin> except people who are familiar enough with CDBI finding time
Perrin> to work on it.

And Perrin, I believe I learned from you that caches are tricky
things, because once you have a cache, you have to figure out *when*
and *for how long* you can use it.

For example, if I expect that a ->retrieve call gets me a real
database hit because someone else is also changing the record, putting
a cache in the middle will mess me up.

If I haven't misunderstood your rantings about caching database
queries {grin}, you really should start by hitting the database every
time, and only then figuring out that this is too expensive when
proven so in practice.  I believe the phrase was "databases are very
fast". :)

        -- 
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

(message missing)

loading many objects from one query
Andrew Pimlott 01:05 on 14 Sep 2004

Re: loading many objects from one query
Perrin Harkins 02:22 on 14 Sep 2004

Re: loading many objects from one query
Tim Bunce 09:09 on 14 Sep 2004

Re: loading many objects from one query
Perrin Harkins 14:21 on 14 Sep 2004

Re: loading many objects from one query
Tim Bunce 16:07 on 14 Sep 2004

Re: loading many objects from one query
Perrin Harkins 16:12 on 14 Sep 2004

Re: loading many objects from one query
Andrew Pimlott 23:05 on 14 Sep 2004

Re: loading many objects from one query
Perrin Harkins 23:22 on 14 Sep 2004

Re: loading many objects from one query
Todd Lorenz 16:13 on 14 Sep 2004

Re: loading many objects from one query
Tim Bunce 13:52 on 15 Sep 2004

Re: loading many objects from one query
Perrin Harkins 15:22 on 15 Sep 2004

Re: loading many objects from one query
merlyn (Randal L. Schwartz) 17:10 on 16 Sep 2004

Re: loading many objects from one query
Andrew Pimlott 19:17 on 16 Sep 2004

Re: loading many objects from one query
Tim Bunce 17:36 on 14 Sep 2004

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