ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From friendVU admin <maill...@friendvu.com>
Subject Re: R: What is N+1
Date Wed, 09 Feb 2005 15:48:16 GMT
The 16 way join and put the DB in App. server RAM?
My experience on several terabytes DBs has been opposite, I hope you 
trust me too :-D .
Getting a list of categories, then you click on a catagory and get a 
list of products, then you click on a product and get a list of 
components is much faster and less stress on a db(and therfore not only 
each querry is faster but more scaleable); it reduces a # of joins.

Ex: A common thing I used to consult on before Java was Performance and 
Tuning SQL DBs. A client would have a slow querry, and they say make it 
fast. I can! I used to take things that take 15 minutes down to split 
second. One tecquique is to break a complex querry into 2 simpler 
querries with less joins; even using a temporary tables. This 
exponentialy increased peformance to sub second.
(also.. you avoid group by, distinct, order by... imagine sorting 30 
million records BEFORE you start to returun... and that you have 10,000 
concurent users each runing a variation on the querry. Lots of trick to 
get arround that).

All the best,

.V

Clinton Begin wrote:

>With the N+1 selects solution, you can do this with one query, with
>one hit to the database -- no matter how many relationships you have
>or how much data.
>
>Trust me bud, this is VERY good advice.
>
>Cheers,
>Clinton
>
>  
>


Mime
View raw message