Hi Felipe,

Joins may be expensive. But what is really important prior to any optimization 
is to know how the data in this query behaves (reads, writes), how often this 
query will be executed, how important is this query for the business and 
customers, would it be a problem if it takes a few minutes , how up-to-date 
should be the information, seconds, minutes, hours.

If this query needs for example to be executed in few milliseconds, and you 
have million of records on each of the 6 tables then  probably you would like 
to avoid calculating the joins every time, so you may create a denormalised 
table which is updated regularly using some triggering mechanism, the downside 
is that you have to maintain yet another table and a trigger mechanism. 

At the end everything has a cost, and you need to identify if it worth it. If 
nobody complains and you do not see a good reason to optimize it, just do not 
care about that. 

Cheers,
Nestor

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to