> 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!


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to