Re: difference in plan between 8.0 and 8.1?

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: <stange(at)rentec(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: difference in plan between 8.0 and 8.1?
Date: 2005-08-26 15:12:48
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3417DD1F3@Herge.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> Hello all,
>
> I was hoping someone could explain the plan for a statement.
>
> We have a table with a column of longs being used as an index. The
> query plan in 8.0 was like this:
>
> # explain select distinct timeseriesid from tbltimeseries where
> timeseriesid > 0 order by timeseriesid;

I had the same problem. You probably already have seq scan turned off,
or the server would be using that. You may have to turn bitmap off or
rework you query such that the server will use the index. (between?).

Anyways, distinct is code word for 'bad performance' :). Consider
laying out tables such that it not necessary, for example set up table
with RI link. Then you can do this in zero time.

Good luck!

Merlin

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Fuhr 2005-08-26 15:16:08 Re: difference in plan between 8.0 and 8.1?
Previous Message Merlin Moncure 2005-08-26 14:49:23 Re: Limit + group + join