From: | hubert depesz lubaczewski <depesz(at)depesz(dot)com> |
---|---|
To: | Michael Kemanetzis <michael(dot)kemanetzis(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Select query ignores index on large table |
Date: | 2011-01-27 14:12:45 |
Message-ID: | 20110127141245.GD15777@depesz.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Jan 27, 2011 at 04:04:02PM +0200, Michael Kemanetzis wrote:
> Hello, I'm experiencing a strange behavior running a simple select query on
> a table that has about 12 million rows. Specifically, changing the "LIMIT"
> value seems to change the execution plan but the result in one of the cases
> is unjustifiably slow, as if it ignores all indexes.
>
> The table structure, the queries used and the results are here:
> http://pastebin.com/fn36BuKs
>
> Is there anything I can do to improve the speed of this query?
create index qq on vehicleevent (veh_id, event_id)
could help.
Best regards,
depesz
--
Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/
jid/gtalk: depesz(at)depesz(dot)com / aim:depeszhdl / skype:depesz_hdl / gg:6749007
From | Date | Subject | |
---|---|---|---|
Next Message | Sim Zacks | 2011-01-27 14:15:37 | Re: Queyring for columns which are exist in table. |
Previous Message | Michael Kemanetzis | 2011-01-27 14:04:02 | Select query ignores index on large table |