Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Fahad G(dot)" <Fahad(dot)Gilani(at)anusf(dot)anu(dot)edu(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever
Date: 2005-01-15 04:31:05
Message-ID: 29023.1105763465@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Fahad G." <Fahad(dot)Gilani(at)anusf(dot)anu(dot)edu(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Fahad G. 2005-01-15 05:02:47 Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever
Previous Message Alvaro Herrera 2005-01-15 04:13:17 Re: Bug Report