Unix Technical Forum

Re: two queries and dual cpu (perplexed)

This is a discussion on Re: two queries and dual cpu (perplexed) within the Pgsql Performance forums, part of the PostgreSQL category; --> On Apr 21, 2005, at 11:33 PM, Shoaib Burq (VPAC) wrote: > > BTW I guess should mention that ...


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

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:36 AM
Jeff
 
Posts: n/a
Default Re: two queries and dual cpu (perplexed)


On Apr 21, 2005, at 11:33 PM, Shoaib Burq (VPAC) wrote:

>
> BTW I guess should mention that I am doing the select count(*) on a
> View.
>


A bit of a silly question...
but are you actually selecting all the rows from this query in
production or would it be more selective? ie select * from bigslowview
where bah = 'snort'?


> Ran the Explain analyse with the nestedloop disabled but it was taking
> forever... and killed it after 30mins.
>


If it takes too long you can run just plain explain (no analyze) and it
will show you the plan. This is nearly always instant... it'll give
you a clue as to if your setting changes did anything.

You may need to end up breaking some parts of this up into subqueries.
I've had to do this before. I had one query that just ran too dang
slow as a join so I modified it into a subquery type deal. Worked
great. However since you are selecting ALL rows I doubt that will help
much.

Another option may be to use materialized views. Not sure how
"dynamic" your data model is. It could help.

--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

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 10:15 PM.


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