Re: Change query join order

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kaloyan Iliev Iliev <kaloyan(at)digsys(dot)bg>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Change query join order
Date: 2010-01-08 18:27:03
Message-ID: 9969.1262975223@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Kaloyan Iliev Iliev <kaloyan(at)digsys(dot)bg> writes:
> My question is why the planner didn't do the index scan first on ms_data
> to reduce the rows to ~ 11000 and the use the PK index on
> ms_commands_history.

11000 index probes aren't exactly free. If they take more than about
1msec apiece, the planner picked the right plan.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2010-01-08 19:01:18 Re: Change query join order
Previous Message Kevin Grittner 2010-01-08 18:12:40 Re: Massive table (500M rows) update nightmare