[ic] flypage sql-queries on crack .. optimisation?

Daniel Browning db at kavod.com
Tue Mar 8 11:43:19 EST 2005


* Sandy Thomson <sandy at scotwebshops.com> [2005-03-08 07:21]:
> Hi,
> I was trying to debug high load on our server this morning, and I 
> noticed loads of queries when someone looked at a product (See example 
> at bottom of email).

[snip comments about flypage generating hundreds of queries]

> Although the query times involved are very short, is this a good thing 
> to do? 

No.  It's as slow as molasses.  The standard catalog is not optimized for
performance.  

> Is the saved memory worth the additional DB queries?

No.  It will grab fields from multiple product tables without modification, but
so could a single query if it were designed correctly.  (Or two queries if the
tables are in different databases.)

> Using IC 5.2, Postgres 8.0.1, Apache 2.0.53
> 
> Can anyone shed any light about this? Cheers.

The flypage is only one of many poorly-optimized pages of the standard catalog. 
The search results and category results are even worse (because the problem is
multiplied by the number of products in the category).

There's really nothing to recommend the current design, maybe someday someone
will get around to fixing it.

-- 
Daniel Browning <db at kavod.com> - Kavod Technologies.  Random Fortune:
That's the thing about people who think they hate computers.  What they
really hate is lousy programmers.
- Larry Niven and Jerry Pournelle in "Oath of Fealty"


More information about the interchange-users mailing list