pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Mario Splivalo <mario.splivalo@megafon.hr>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Forcing seq_scan off for large table joined with tiny table yeilds improved performance
Date: Mon, 6 Apr 2009 07:58:05 -0600
Message-ID: <dcc563d10904060658v621cbd3drbb75b6428d770b04@mail.gmail.com> (raw)
In-Reply-To: <49D9F39F.40106@megafon.hr>
References: <49D0D237.7020308@megafon.hr>
	<3028.1238422571@sss.pgh.pa.us>
	<49D0E687.50605@megafon.hr>
	<dcc563d10903300925m88a73c7kf90084b5e088a445@mail.gmail.com>
	<49D9F39F.40106@megafon.hr>

On Mon, Apr 6, 2009 at 6:20 AM, Mario Splivalo
<mario.splivalo@megafon.hr> wrote:
> Scott Marlowe wrote:
>>
>> It's not really solved, it's just a happy coincidence that the current
>> plan runs well.  In order to keep the query planner making good
>> choices you need to increase stats target for the field in the index
>> above.  The easiest way to do so is to do this:
>>
>> alter database mydb set default_statistics_target=100;
>>
>> and run analyze again:
>>
>> analyze;
>
> So, i removed the index on field_name, set default_default_statistics_target
> to 100, analyzed, and the results are the same:

Why did you remove the index?



view thread (10+ messages)  latest in thread

Message-ID: <dcc563d10904060658v621cbd3drbb75b6428d770b04@mail.gmail.com>
Permalink:  ../dcc563d10904060658v621cbd3drbb75b6428d770b04@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10904060658v621cbd3drbb75b6428d770b04@mail.gmail.com

 · 

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: scott.marlowe@gmail.com, mario.splivalo@megafon.hr, tgl@sss.pgh.pa.us
  Subject: Re: Forcing seq_scan off for large table joined with tiny table yeilds improved performance
  In-Reply-To: <dcc563d10904060658v621cbd3drbb75b6428d770b04@mail.gmail.com>

* 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