pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kaloyan Iliev Iliev <kaloyan@digsys.bg>
Cc: pgsql-performance@postgresql.org
Subject: Re: Change query join order
Date: Fri, 08 Jan 2010 13:27:03 -0500
Message-ID: <9969.1262975223@sss.pgh.pa.us> (raw)
In-Reply-To: <4B47722A.4010502@digsys.bg>
References: <4B47722A.4010502@digsys.bg>

Kaloyan Iliev Iliev <kaloyan@digsys.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



view thread (5+ messages)  latest in thread

Message-ID: <9969.1262975223@sss.pgh.pa.us>
Permalink:  ../9969.1262975223@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9969.1262975223@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kaloyan@digsys.bg
  Subject: Re: Change query join order
  In-Reply-To: <9969.1262975223@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox