Unix Technical Forum

Re: difference in plan between 8.0 and 8.1?

This is a discussion on Re: difference in plan between 8.0 and 8.1? within the Pgsql Performance forums, part of the PostgreSQL category; --> > Hello all, > > I was hoping someone could explain the plan for a statement. > > We ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 12:18 PM
Merlin Moncure
 
Posts: n/a
Default Re: difference in plan between 8.0 and 8.1?

> 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

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:31 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com