Re: Slow Query

2008-06-28 Thread Darryl Steyn
entire month and lets us know. > > If the number of rows processed by db is more than 10% of the total rows, > than optimizer considers doing a FULL TABLE scan better than a index scan > > > On 6/27/08, Darryl Steyn <[EMAIL PROTECTED]> wrote: > >> Hi Ananda, >>

Re: Slow Query

2008-06-27 Thread Darryl Steyn
ysql give date in Y-M-D you might want to remove the > "from_unixtime" and "date_format" formating functions > > On 6/27/08, Darryl Steyn <[EMAIL PROTECTED]> wrote: > >> Hi Jörg, >> >> I have applied the changes you have suggested and still no

Re: Slow Query

2008-06-27 Thread Darryl Steyn
AIL PROTECTED]> wrote: > Hi Darryl, all, > > > Darryl Steyn wrote: > >> Hi Ananda, >> >> The query is for reporting purposes and I would like to include a date >> range >> for the user to report on. That part of the query has to be there for it >>

Re: Slow Query

2008-06-27 Thread Darryl Steyn
gt; Indexing looks fine, but what are ur trying to achive using this conditions > > "cache.server.tstamp > 0) AND > ((date_format(cache.server.tstamp,'%Y-%m-%d') BETWEEN "2008-05-31" AND > "2008-06-10" ))" > > > > > > On 6/27/0

Re: Slow Query

2008-06-27 Thread Darryl Steyn
PROTECTED]> wrote: > what are the columns in namekey index > > > On 6/27/08, Darryl Steyn <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I am running a query that I feel shouldn't be taking as long as it does to >> execute. The query is as follo

Slow Query

2008-06-27 Thread Darryl Steyn
Hi, I am running a query that I feel shouldn't be taking as long as it does to execute. The query is as follows; SELECT traffic.trafficin.bytes_in as bytes_in, round(cache.server.serverallkbytes_in) as serverallkbytes_in, cache.server.tstamp as tstamp FROM traffic.trafficin LEFT JOIN cache.server