pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <pg@rbt.ca>
To: ken <southerland@samsixedd.com>
Cc: Postgresql Performance <pgsql-performance@postgresql.org>
Subject: Re: Index oddity
Date: Wed, 09 Jun 2004 16:56:38 -0400
Message-ID: <1086814597.2539.92.camel@jester> (raw)
In-Reply-To: <1086814209.32077.252.camel@pesky>
References: <1086809460.32077.246.camel@pesky>
	<1086811930.2539.90.camel@jester>
	<1086814209.32077.252.camel@pesky>

On Wed, 2004-06-09 at 16:50, ken wrote:
> Thanks Rod,
> 
> This setting has no effect however.  If I set statistics to 1000, or

Okay.. but you never did send EXPLAIN ANALYZE output. I want to know
what it is really finding.

> On Wed, 2004-06-09 at 13:12, Rod Taylor wrote:
> > It seems to believe that the number of rows returned for the >49.999
> > case will be 4 times the number for the >50 case. If that was true, then
> > the sequential scan would be correct.
> > 
> > ALTER TABLE <table> ALTER COLUMN diagonalsize SET STATISTICS 1000;
> > ANALZYE <table>;
> > 
> > Send back EXPLAIN ANALYZE output for the >49.999 case.
> > 
> > > The query plan for diagonalSize > 50.000 is ...
> > > 
> > > Index Scan using nrgfeature_xys_index on nrgfeature f 
> > > (cost=0.00..17395.79 rows=4618 width=220)
> > >    Index Cond: ((upperrightx > 321264.236977215::double precision) AND
> > > (lowerleftx < 324046.799812083::double precision) AND (upperrighty >
> > > 123286.261898636::double precision) AND (lowerlefty <
> > > 124985.927450476::double precision) AND (diagonalsize > 50::double
> > > precision))
> > > 
> > > ... while for diagonalSize > 49.999 is ...
> > > 
> > >  Seq Scan on nrgfeature f  (cost=0.00..31954.70 rows=18732 width=220)
> > >    Filter: ((upperrightx > 321264.236977215::double precision) AND
> > > (lowerleftx < 324046.799812083::double precision) AND (upperrighty >
> > > 123286.261898636::double precision) AND (lowerlefty <
> > > 124985.927450476::double precision) AND (diagonalsize > 49.999::double
> > > precision))
> > 
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 9: the planner will ignore your desire to choose an index scan if your
> >       joining column's datatypes do not match
> > 




view thread (12+ messages)  latest in thread

Message-ID: <1086814597.2539.92.camel@jester>
Permalink:  ../1086814597.2539.92.camel@jester/
Also on:    postgresql.org/message-id/1086814597.2539.92.camel@jester

 · 

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: pg@rbt.ca, southerland@samsixedd.com
  Subject: Re: Index oddity
  In-Reply-To: <1086814597.2539.92.camel@jester>

* 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