Re: [PERFORM] Why creating GIN table index is so slow than inserting data into empty table with the same index?

2009-03-24 Thread Heikki Linnakangas
Tom Lane wrote: Sergey Burladyan eshkin...@gmail.com writes: show maintenance_work_mem ; maintenance_work_mem -- 128MB create table a (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int); insert into a select n, n, n, n, n, n from generate_series(1, 10) as n; create

Re: [PERFORM] High CPU Utilization

2009-03-24 Thread Joe Uhl
On Mar 20, 2009, at 4:58 PM, Scott Marlowe wrote: On Fri, Mar 20, 2009 at 2:49 PM, Joe Uhl joe...@gmail.com wrote: On Mar 20, 2009, at 4:29 PM, Scott Marlowe wrote: What does the cs entry on vmstat say at this time? If you're cs is skyrocketing then you're getting a context switch storm,

Re: [PERFORM] High CPU Utilization

2009-03-24 Thread Greg Smith
On Tue, 24 Mar 2009, Joe Uhl wrote: Can anyone recommend a whitebox vendor? I dumped a list of recommended vendors from a discussion here a while back at http://wiki.postgresql.org/wiki/SCSI_vs._IDE/SATA_Disks you could get started with. -- * Greg Smith gsm...@gregsmith.com

Re: [PERFORM] High CPU Utilization

2009-03-24 Thread Scott Marlowe
On Tue, Mar 24, 2009 at 1:29 PM, Greg Smith gsm...@gregsmith.com wrote: On Tue, 24 Mar 2009, Joe Uhl wrote: Can anyone recommend a whitebox vendor? I dumped a list of recommended vendors from a discussion here a while back at http://wiki.postgresql.org/wiki/SCSI_vs._IDE/SATA_Disks you could

Re: [PERFORM] Help Me Understand Why I'm Getting a Bad Query Plan

2009-03-24 Thread Bryan Murphy
I hate to nag, but could anybody help me with this? We have a few related queries that are causing noticeable service delays in our production system. I've tried a number of different things, but I'm running out of ideas and don't know what to do next. Thanks, Bryan On Mon, Mar 23, 2009 at

Re: [PERFORM] High CPU Utilization

2009-03-24 Thread Ron
At 02:47 PM 3/24/2009, Joe Uhl wrote: Turns out we may have an opportunity to purchase a new database server with this increased load. Seems that the best route, based on feedback to this thread, is to go whitebox, get quad opterons, and get a very good disk controller. Can anyone

Re: [PERFORM] High CPU Utilization

2009-03-24 Thread Scott Marlowe
On Tue, Mar 24, 2009 at 4:58 PM, Ron rjpe...@earthlink.net wrote: At 02:47 PM 3/24/2009, Joe Uhl wrote: Turns out we may have an opportunity to purchase a new database server with this increased load.  Seems that the best route, based on feedback to this thread, is to go whitebox, get quad

Re: [PERFORM] High CPU Utilization

2009-03-24 Thread Scott Carey
On 3/24/09 4:16 PM, Scott Marlowe scott.marl...@gmail.com wrote: On Tue, Mar 24, 2009 at 4:58 PM, Ron rjpe...@earthlink.net wrote: At 02:47 PM 3/24/2009, Joe Uhl wrote: Turns out we may have an opportunity to purchase a new database server with this increased load.  Seems that the best

[PERFORM] Raid 10 chunksize

2009-03-24 Thread Mark Kirkwood
I'm trying to pin down some performance issues with a machine where I work, we are seeing (read only) query response times blow out by an order of magnitude or more at busy times. Initially we blamed autovacuum, but after a tweak of the cost_delay it is *not* the problem. Then I looked at

Re: [PERFORM] Raid 10 chunksize

2009-03-24 Thread Scott Carey
On 3/24/09 6:09 PM, Mark Kirkwood mar...@paradise.net.nz wrote: I'm trying to pin down some performance issues with a machine where I work, we are seeing (read only) query response times blow out by an order of magnitude or more at busy times. Initially we blamed autovacuum, but after a

Re: [PERFORM] Raid 10 chunksize

2009-03-24 Thread David Rees
On Tue, Mar 24, 2009 at 6:48 PM, Scott Carey sc...@richrelevance.com wrote: Your xlogs are occasionally close to max usage too -- which is suspicious at 10MB/sec.  There is no reason for them to be on ext3 since they are a transaction log that syncs writes so file system journaling doesn't mean

Re: [PERFORM] Raid 10 chunksize

2009-03-24 Thread Scott Marlowe
On Tue, Mar 24, 2009 at 7:09 PM, Mark Kirkwood mar...@paradise.net.nz wrote: I'm trying to pin down some performance issues with a machine where I work, we are seeing (read only) query response times blow out by an order of magnitude or more at busy times. Initially we blamed autovacuum, but

Re: [PERFORM] Help Me Understand Why I'm Getting a Bad Query Plan

2009-03-24 Thread Josh Berkus
Brian, I hate to nag, but could anybody help me with this? We have a few related queries that are causing noticeable service delays in our production system. I've tried a number of different things, but I'm running out of ideas and don't know what to do next. For some reason, your first

Re: [PERFORM] Help Me Understand Why I'm Getting a Bad Query Plan

2009-03-24 Thread marcin mank
There is one thing I don`t understand: - Nested Loop (cost=0.00..180564.28 rows=1806 width=37) (actual time=0.192..60.214 rows=3174 loops=1) - Index Scan using visitors_userid_index2 on visitors v (cost=0.00..2580.97 rows=1300 width=33) (actual

Re: [PERFORM] Raid 10 chunksize

2009-03-24 Thread Greg Smith
On Tue, 24 Mar 2009, David Rees wrote: I would tend to recommend ext3 in data=writeback and make sure that it's mounted with noatime over using ext2 - for the sole reason that if the system shuts down unexpectedly, you don't have to worry about a long fsck when bringing it back up. Well,

Re: [PERFORM] Help Me Understand Why I'm Getting a Bad Query Plan

2009-03-24 Thread Bryan Murphy
On Tue, Mar 24, 2009 at 10:04 PM, marcin mank marcin.m...@gmail.com wrote: There is one thing I don`t understand:              -  Nested Loop  (cost=0.00..180564.28 rows=1806 width=37) (actual time=0.192..60.214 rows=3174 loops=1)                    -  Index Scan using visitors_userid_index2

Re: [PERFORM] Help Me Understand Why I'm Getting a Bad Query Plan

2009-03-24 Thread Bryan Murphy
On Tue, Mar 24, 2009 at 9:30 PM, Josh Berkus j...@agliodbs.com wrote: For some reason, your first post didn't make it to the list, which is why nobody responded. Weird... I've been having problems with gmail and google reader all week. I've got a query on our production system that isn't

Re: [PERFORM] Raid 10 chunksize

2009-03-24 Thread Mark Kirkwood
Scott Marlowe wrote: On Tue, Mar 24, 2009 at 7:09 PM, Mark Kirkwood mar...@paradise.net.nz wrote: I'm trying to pin down some performance issues with a machine where I work, we are seeing (read only) query response times blow out by an order of magnitude or more at busy times. Initially we