Comments on: 700 queries for one page load? http://thoughts.davisjeff.com/2007/11/17/700-queries-for-one-page-load/ Ideas on Databases, Logic, and Language by Jeff Davis Tue, 19 Jun 2012 16:18:51 +0000 hourly 1 http://wordpress.org/?v=3.3.1 By: David Fetter http://thoughts.davisjeff.com/2007/11/17/700-queries-for-one-page-load/comment-page-1/#comment-21 David Fetter Tue, 20 Nov 2007 06:11:45 +0000 http://davisjeff.wordpress.com/?p=28#comment-21 It's not faerie-land when Postgres has this amazing ability to return useful serialized data structures at each row and column. :-) It’s not faerie-land when Postgres has this amazing ability to return useful serialized data structures at each row and column. :-)

]]>
By: Jeff Davis http://thoughts.davisjeff.com/2007/11/17/700-queries-for-one-page-load/comment-page-1/#comment-20 Jeff Davis Tue, 20 Nov 2007 03:09:19 +0000 http://davisjeff.wordpress.com/?p=28#comment-20 I'm sure if you get creative enough, you can think of some kind of use for many queries to load one page. But 100 queries for one page load is a red flag. At a minimum you should do a double-take on a number like that, and re-examine the design that lead to that outcome. The fact is that many of those RT queries are *duplicates*. I believe many of the rest are just an artifact of poor design. Good design indicates that you issue about one query for each different type of information that you need. I’m sure if you get creative enough, you can think of some kind of use for many queries to load one page.

But 100 queries for one page load is a red flag. At a minimum you should do a double-take on a number like that, and re-examine the design that lead to that outcome.

The fact is that many of those RT queries are *duplicates*. I believe many of the rest are just an artifact of poor design.

Good design indicates that you issue about one query for each different type of information that you need.

]]>
By: Jasper http://thoughts.davisjeff.com/2007/11/17/700-queries-for-one-page-load/comment-page-1/#comment-19 Jasper Tue, 20 Nov 2007 01:32:14 +0000 http://davisjeff.wordpress.com/?p=28#comment-19 0 or 1 query per page load? Why don't you go back to the magic land with the faeries whence you obviously came? 100 is on the high side, yes. I'd say 20 and up would be performed for a page performing some work on a very well written system. I used to work somewhere where we had around 8-900 queries per page load. They were all lightning fast mySQL selects, and not causing any sort of a bottleneck 0 or 1 query per page load? Why don’t you go back to the magic land with the faeries whence you obviously came?

100 is on the high side, yes. I’d say 20 and up would be performed for a page performing some work on a very well written system.

I used to work somewhere where we had around 8-900 queries per page load. They were all lightning fast mySQL selects, and not causing any sort of a bottleneck

]]>
By: David Fetter http://thoughts.davisjeff.com/2007/11/17/700-queries-for-one-page-load/comment-page-1/#comment-18 David Fetter Mon, 19 Nov 2007 04:07:22 +0000 http://davisjeff.wordpress.com/?p=28#comment-18 The harsh words were completely justified. Generally you're shooting for 0 or 1 queries per page load, and 100 is ludicrously too many. The harsh words were completely justified. Generally you’re shooting for 0 or 1 queries per page load, and 100 is ludicrously too many.

]]>
By: Jeff Davis http://thoughts.davisjeff.com/2007/11/17/700-queries-for-one-page-load/comment-page-1/#comment-17 Jeff Davis Sun, 18 Nov 2007 14:44:51 +0000 http://davisjeff.wordpress.com/?p=28#comment-17 I'll post a report to the list on Monday. As I said most of that was because the static content was also causing database access, which we can avoid (bringing us down to about 100 queries). Sorry for the harsh words in the post, but needless to say I was stunned by the sheer volume of database queries. Even 100 queries is a lot for one page load. I’ll post a report to the list on Monday.

As I said most of that was because the static content was also causing database access, which we can avoid (bringing us down to about 100 queries).

Sorry for the harsh words in the post, but needless to say I was stunned by the sheer volume of database queries. Even 100 queries is a lot for one page load.

]]>
By: Jesse http://thoughts.davisjeff.com/2007/11/17/700-queries-for-one-page-load/comment-page-1/#comment-16 Jesse Sun, 18 Nov 2007 11:52:12 +0000 http://davisjeff.wordpress.com/?p=28#comment-16 700 eh? That sounds...wrong. And like a prefetch or a caching layer isn't working right. Would you be up for helping us triage this on rt-devel@lists.bestpractical.com? I'm not going to pretend that RT is a paragon of relational design, but that sounds like something is broken. And we do like to fix broken things ;-) Best, Jesse (RT is generally considered to be all my fault) 700 eh? That sounds…wrong. And like a prefetch or a caching layer isn’t working right. Would you be up for helping us triage this on rt-devel@lists.bestpractical.com? I’m not going to pretend that RT is a paragon of relational design, but that sounds like something is broken. And we do like to fix broken things ;-)

Best,
Jesse (RT is generally considered to be all my fault)

]]>