Re: How do you like this SQL?

From: dombrooks <dombrooks_at_hotmail.com>
Date: Fri, 14 Dec 2012 04:09:43 -0800 (PST)
Message-ID: <3a115807-13bd-4c2c-a317-e31fbd3ca2d4_at_googlegroups.com>



>> It's very hard to condemn a snippet of SQL.
> Well, not always.

It's very hard to condemn THIS snippet of SQL.

It's not obvious that the model is messed up. It's not clear that there is a table missing.

The snippet is merely getting the latest comments for a set of data.

There's no evidence that using an analytic would make it faster. It might well do.
But it might be slower.

Particularly when one needs to get "the most recent/least recent/highest/lowest row" for a set of data, the best approach is not always obvious. Received on Fri Dec 14 2012 - 13:09:43 CET

Original text of this message