Re: Re: Performance Query

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

From: Tony Bowden
Subject: Re: Re: Performance Query
Date: 07:45 on 07 Sep 2004
On Tue, Sep 07, 2004 at 08:30:15AM +0100, tom@xxxxxxxx.xxx wrote:
> The first SQL is 1 query with 1 overhead retriving X rows and the
> 2nd loop is 1+X*3 queries retrieving X+1 rows. My worries are that if
> I start retrieve a few thousand rows, instead of 1 query, I have 3000+
> queries to the database. Make this a web site with a few concurrent
> visitors and suddenly I am hitting the database with 10,000 queries? To
> me that is a performance issue.

Why? Have you actually experienced this as a problem, profiled it, and
discovered this is your bottleneck?

Until you have, don't worry about it. 

If you're really going to have to deal with all of these thousand rows,
then fetching the data from the database is rarely going to be the slow
part anyway. If you're fetching them and throwing them away without
dealing with them, then you want to stop doing that first.

Tony

Performance Query
tom 13:25 on 06 Sep 2004

Re: Performance Query
William McKee 21:23 on 06 Sep 2004

Re: Re: Performance Query
tom 07:30 on 07 Sep 2004

Re: Re: Performance Query
Tony Bowden 07:45 on 07 Sep 2004

Re: Performance Query
William McKee 14:15 on 07 Sep 2004

Re: Re: Performance Query
Perrin Harkins 21:10 on 07 Sep 2004

Re: Performance Query
Carl Johnstone 08:57 on 07 Sep 2004

Re: Performance Query
Tony Bowden 09:09 on 07 Sep 2004

RE: Performance Query
Carl Johnstone 09:11 on 07 Sep 2004

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