Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever
Date
Msg-id 29023.1105763465@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever  ("Fahad G." <Fahad.Gilani@anusf.anu.edu.au>)
Responses Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever  (Michael Fuhr <mike@fuhr.org>)
Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever  ("Fahad G." <Fahad.Gilani@anusf.anu.edu.au>)
List pgsql-bugs
"Fahad G." <Fahad.Gilani@anusf.anu.edu.au> writes:
> -- Indexes
> CREATE INDEX jobstat_lc_q4_2004_jobid ON jobstat_lc_q4_2004 USING btree
> (jobid);
> CREATE INDEX jobstat_lc_q4_2004_fetchtime ON jobstat_lc_q4_2004 USING btree
> (fetchtime);
> CREATE UNIQUE INDEX jobstat_lc_q4_2004_walltime ON
> unq_jobstat_lc_q4_2004_jobid_fetch USING btree (jobid, fetchtime);

I bet it's choosing the wrong index.  What does EXPLAIN show in each
case?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Bug Report
Next
From: Michael Fuhr
Date:
Subject: Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever