Re: [Secureideas-base-devel] [ 1751420 ] Performance with query SELECT COUNT(DISTINCT field)
Brought to you by:
secureideas,
sinukas
From: Michael S. <ms...@ma...> - 2008-06-06 16:46:57
|
On Thu, Jun 05, 2008 at 07:38:58PM -0500, Sean Muller wrote: > $sql = "SELECT DISTINCT signature, count(signature) as sig_cnt, ". ... > $sort_sql[0].$from.$where." GROUP BY signature, sig_name, As I look at this though, I do see one obvious opportunity for optimization: isn't the initial DISTINCT redundant to the GROUP BY signature? Taking that off makes my 290s query run in about 210s. Mike Stone |