Re: [PERFORM] Postgres on VPS - how much is enough?

2006-03-07 Thread Matthew Nuzum
On 3/7/06, Dave Page wrote: > On 7/3/06 18:45, "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > > On Mon, Mar 06, 2006 at 01:14:45PM -0400, Marc G. Fournier wrote: > >> We host VPSs here (http://www.hub.org) and don't use the 'single file, > >> virtual file system' to put them into ... it must depend o

Re: [PERFORM] firebird X postgresql 8.1.2 windows, performance comparison

2006-03-07 Thread Andre Felipe Machado
Hello, Many thanks for the valuable suggestions and insights. The defaults enable_bitmapscan and enable_seqscan were altered by my friend. He already re enabled them (maybe even while I was trying some of the queries). The machine is a P4 3.2GHz, 1 GBram, sata hd, windows 2000. I did not used pg on

Re: [PERFORM] Can anyone explain this pgbench results?

2006-03-07 Thread Jim C. Nasby
On Tue, Mar 07, 2006 at 09:15:37PM +0100, Joost Kraaijeveld wrote: > Jim C. Nasby wrote: > > Well, the problem is that you're using RAID5, which has a huge write > > overhead. You're unlikely to get good performance with it. > Apparently. But I had no idea that the performance hit would be that big

Re: [PERFORM] Can anyone explain this pgbench results?

2006-03-07 Thread Joost Kraaijeveld
Jim C. Nasby wrote: > Well, the problem is that you're using RAID5, which has a huge write > overhead. You're unlikely to get good performance with it. Apparently. But I had no idea that the performance hit would be that big. Running bonnie or copying a large file with dd show that the card can d

Re: [PERFORM] Postgres on VPS - how much is enough?

2006-03-07 Thread Dave Page
On 7/3/06 18:45, "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > On Mon, Mar 06, 2006 at 01:14:45PM -0400, Marc G. Fournier wrote: >> We host VPSs here (http://www.hub.org) and don't use the 'single file, >> virtual file system' to put them into ... it must depend on where you >> host? > > Yeah, b

Re: [PERFORM] Can anyone explain this pgbench results?

2006-03-07 Thread Jim C. Nasby
On Tue, Mar 07, 2006 at 08:49:30PM +0100, Joost Kraaijeveld wrote: > > Jim C. Nasby wrote: > > > Speaking of 'disks', what's your exact layout? Do you have a 5 drive > > raid5 for the OS and the database, 1 drive for swap and 1 drive for > > pg_xlog? > > On a Sil SATA 3114 controller: > /dev/sd

Re: [PERFORM] firebird X postgresql 8.1.2 windows, performance

2006-03-07 Thread Tom Lane
Scott Marlowe <[EMAIL PROTECTED]> writes: > So, do you see any obvious, low hanging fruit here? It would help if we were being told the whole truth about the settings being used. The first few plans are clearly suffering from the "enable_seqscan = off" error, but the last few don't seem to be. I

Re: [PERFORM] Can anyone explain this pgbench results?

2006-03-07 Thread Joost Kraaijeveld
Jim C. Nasby wrote: > Speaking of 'disks', what's your exact layout? Do you have a 5 drive > raid5 for the OS and the database, 1 drive for swap and 1 drive for > pg_xlog? On a Sil SATA 3114 controller: /dev/sda OS + Swap /dev/sdb /var with pg_xlog On the 3Ware 9500S-8, 5 disk array: /dev/sdc

Re: [PERFORM] pg_reset_stats + cache I/O %

2006-03-07 Thread Tom Lane
"mcelroy, tim" <[EMAIL PROTECTED]> writes: > ERROR: function round(double precision, integer) does not exist Try coercing to numeric instead of float. Also, it'd be a good idea to put that coercion outside the sum()'s instead of inside --- summing bigints is probably noticeably faster than summi

Re: [PERFORM] Postgres and Ingres R3 / SAN

2006-03-07 Thread Jim C. Nasby
On Tue, Mar 07, 2006 at 11:20:50AM -0800, Mark Lewis wrote: > On Tue, 2006-03-07 at 13:00 -0600, Jim C. Nasby wrote: > > ... > > > PostgreSQL on a SAN won't buy you what I think you think it will. It's > > essentially impossible to safely run two PostgreSQL installs off the > > same data files wi

Re: [PERFORM] Postgres and Ingres R3 / SAN

2006-03-07 Thread Mark Lewis
On Tue, 2006-03-07 at 13:00 -0600, Jim C. Nasby wrote: ... > PostgreSQL on a SAN won't buy you what I think you think it will. It's > essentially impossible to safely run two PostgreSQL installs off the > same data files without destroying your data. What a SAN can buy you is > disk-level replica

Re: [PERFORM] Can anyone explain this pgbench results?

2006-03-07 Thread Jim C. Nasby
On Mon, Mar 06, 2006 at 04:29:49PM +0100, Joost Kraaijeveld wrote: > I was expecting a low(ish) score the first run (because the tables are not > loaded in the cache yet), followed by continues high(ish) scores, but not an > alternating pattern. I also did not expect so much difference, given the

[PERFORM] pg_reset_stats + cache I/O %

2006-03-07 Thread mcelroy, tim
Title: pg_reset_stats + cache I/O % Good afternoon, Relatively new to PostgreSQL and have been assigned the task of capturing cache I/O % hits.  I figured out (thanks to other posts) how to turn on the capture and what stats to (kind of) capture.  I did find a view in the archives as shown be

Re: [PERFORM] Postgres and Ingres R3 / SAN

2006-03-07 Thread Jim C. Nasby
Please don't steal threds; post a new email rather than replying to an existing thread. On Mon, Mar 06, 2006 at 02:58:32PM -0500, Jeremy Haile wrote: > Clustering solutions for PostgreSQL are currently pretty limited. Slony > could be a good option in the future, but it currently only supports >

Re: [PERFORM] Postgres on VPS - how much is enough?

2006-03-07 Thread Jim C. Nasby
On Mon, Mar 06, 2006 at 01:14:45PM -0400, Marc G. Fournier wrote: > We host VPSs here (http://www.hub.org) and don't use the 'single file, > virtual file system' to put them into ... it must depend on where you > host? Yeah, but aren't you also using FreeBSD jails? AFAIK linux doesn't have an eq

Re: [PERFORM] t1000/t2000 sun-servers

2006-03-07 Thread Jim C. Nasby
On Mon, Mar 06, 2006 at 10:24:29PM +0100, Guido Neitzer wrote: > On 06.03.2006, at 21:10 Uhr, Jignesh K. Shah wrote: > > >Like migrate all your postgresql databases to one T2000. You might > >see that your average response time may not be faster but it can > >handle probably all your databases

Re: [PERFORM] Planner enhancement suggestion.

2006-03-07 Thread Jim C. Nasby
On Tue, Mar 07, 2006 at 07:09:15PM +0100, PFC wrote: > > >The problem is that you're now talking about doing 2 index scans instead > >of just one and a sort. > > It depends on what you call an index scan : > a- Scanning just the index (no heap lookup) to create a bitmap Sure, and the

Re: [PERFORM] Planner enhancement suggestion.

2006-03-07 Thread PFC
The problem is that you're now talking about doing 2 index scans instead of just one and a sort. It depends on what you call an index scan : a- Scanning just the index (no heap lookup) to create a bitmap b- Scanning the index and hitting the heap in index order to retrieve the

Re: [PERFORM] firebird X postgresql 8.1.2 windows, performance

2006-03-07 Thread Alvaro Herrera
Scott Marlowe wrote: > On Tue, 2006-03-07 at 11:15, Alvaro Herrera wrote: > > Scott Marlowe wrote: > > > > > Lastly, I noticed that after you clusters on all your indexes, the query > > > planner switched from a merge join to a hash join, and it was slower. > > > You might wanna try turning off h

Re: [PERFORM] firebird X postgresql 8.1.2 windows, performance

2006-03-07 Thread Scott Marlowe
On Tue, 2006-03-07 at 11:15, Alvaro Herrera wrote: > Scott Marlowe wrote: > > > Lastly, I noticed that after you clusters on all your indexes, the query > > planner switched from a merge join to a hash join, and it was slower. > > You might wanna try turning off hash joins for a quick test to see

Re: [PERFORM] firebird X postgresql 8.1.2 windows, performance

2006-03-07 Thread Alvaro Herrera
Scott Marlowe wrote: > Lastly, I noticed that after you clusters on all your indexes, the query > planner switched from a merge join to a hash join, and it was slower. > You might wanna try turning off hash joins for a quick test to see if > merge joins are any faster. Anyway please note that cl

Re: [PERFORM] firebird X postgresql 8.1.2 windows, performance

2006-03-07 Thread Scott Marlowe
On Tue, 2006-03-07 at 10:29, andremachado wrote: > Hello, > A friend asked for help to accelerate some postgresql queries on postgresql > 8.1.2 for windows. > He is comparing with firebird. > Firebird was being up to 90 times faster at some queries. > Attached is a gziped text file containing some

Re: [PERFORM] firebird X postgresql 8.1.2 windows, performance comparison

2006-03-07 Thread Carlos Henrique Reimer
Andre,   I noticed that enable_bitmapscan and enable_seqscan are off, is there a reason for it? Have you tried with enable_bitmapscan on?   How much RAM do you have? What kind of disks are being used?   Beste regards,   Reimer 55-47-33270878 Blumenau - SC - Brazil andremachado <[EMAIL PR

Re: [PERFORM] firebird X postgresql 8.1.2 windows, performance comparison

2006-03-07 Thread Joshua D. Drake
andremachado wrote: Hello, A friend asked for help to accelerate some postgresql queries on postgresql 8.1.2 for windows. He is comparing with firebird. Firebird was being up to 90 times faster at some queries. Attached is a gziped text file containing some steps I tried on a simple example query

[PERFORM] firebird X postgresql 8.1.2 windows, performance comparison

2006-03-07 Thread andremachado
Hello, A friend asked for help to accelerate some postgresql queries on postgresql 8.1.2 for windows. He is comparing with firebird. Firebird was being up to 90 times faster at some queries. Attached is a gziped text file containing some steps I tried on a simple example query. Could get improvemen

Re: [PERFORM] Help understanding indexes, explain, and optimizing

2006-03-07 Thread Tom Lane
"Dave Dutcher" <[EMAIL PROTECTED]> writes: > It sounds like the original posters problem was a less than optimal join > order, and from what I understand Postgres can't reorder left joins. Not really relevant to the OP's immediate problem, but: that's fixed in CVS HEAD. http://archives.postgres

Re: [PERFORM] Help understanding indexes, explain, and optimizing

2006-03-07 Thread Dave Dutcher
Actually I think LEFT OUTER JOIN is equivalent to LEFT JOIN. The Postgres manual says that the word OUTER is optional. Either way you get "...all rows in the qualified Cartesian product (i.e., all combined rows that pass its join condition), plus one copy of each row in the left-hand table for wh

Re: [PERFORM] Can anyone explain this pgbench results?

2006-03-07 Thread Joost Kraaijeveld
Hi Michael, Michael Fuhr wrote: > If you run pgbench several times without intervening checkpoints, > do your postmaster logs have any messages like "checkpoints are > occurring too frequently"? It might be useful to increase > checkpoint_warning up to the value of checkpoint_timeout and then > s

Re: [PERFORM] Can anyone explain this pgbench results?

2006-03-07 Thread Joost Kraaijeveld
Hi Michael, Michael Fuhr wrote: >>> Have you tweaked postgresql.conf at all? If so, what non-default >>> settings are you using? >> >> Yes, I have tweaked the following settings: >> >> shared_buffers = 4 >> work_mem = 512000 >> maintenance_work_mem = 512000 >> max_fsm_pages = 4 >> effec