Re: query does not return after increasing range in 'between' clause - Mailing list pgsql-general

From Tom Lane
Subject Re: query does not return after increasing range in 'between' clause
Date
Msg-id 3056.1409166021@sss.pgh.pa.us
Whole thread Raw
In response to query does not return after increasing range in 'between' clause  (Dennis <dennisr@visi.com>)
List pgsql-general
Dennis <dennisr@visi.com> writes:
> Hi, I am having bad luck with a query that should return zero rows but actually never returns (completes execution.)

Seems like you need a multicolumn index on t_week_f, and maybe also on
nb_products, so that the conditions shown as "filters" here could be
applied as index conditions instead.

I wonder also if your statistics are up to date --- are the rowcount
estimates shown in EXPLAIN reasonably sane?

            regards, tom lane


pgsql-general by date:

Previous
From: Dennis
Date:
Subject: Re: query does not return after increasing range in 'between' clause
Next
From: Ramesh T
Date:
Subject: Re: Deletion