Re: [PERFORM] Tips & Tricks for validating hardware/os

2007-05-22 Thread Greg Smith
On Tue, 22 May 2007, Stephane Bailliez wrote: Out of curiosity, can anyone share his tips & tricks to validate a machine before labelling it as 'ready to use postgres - you probably won't trash my data today' ? Write a little script that runs pgbench in a loop forever. Set your shared_buffe

Re: [PERFORM] Tips & Tricks for validating hardware/os

2007-05-22 Thread Andreas Kostyrka
You forgot pulling some RAID drives at random times to see how the hardware deals with the fact. And how it deals with the rebuild afterwards. (Many RAID solutions leave you with worst of both worlds, taking longer to rebuild than a restore from backup would take, while at the same ime providing

Re: [PERFORM] Postgres Benchmark Results

2007-05-22 Thread Greg Smith
On Tue, 22 May 2007, Gregory Stark wrote: However as mentioned a while back in practice it doesn't work quite right and you should expect to get 1/2 the expected performance. So even with 10 clients you should expect to see 5*120 tps on a 7200 rpm drive and 5*250 tps on a 15kprm drive. I would

Re: [PERFORM] Drop table vs Delete record

2007-05-22 Thread Orhan Aglagul
Checking out right now Thanks for the fast response. -Original Message- From: Andreas Kostyrka [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 22, 2007 11:49 AM To: Orhan Aglagul Cc: Subject: AW: [PERFORM] Drop table vs Delete record Consider table partitioning (it's described in the m

Re: [PERFORM] Drop table vs Delete record

2007-05-22 Thread Andreas Kostyrka
Consider table partitioning (it's described in the manual). Andreas -- Ursprüngl. Mitteil. -- Betreff:[PERFORM] Drop table vs Delete record Von:"Orhan Aglagul" <[EMAIL PROTECTED]> Datum: 22.05.2007 18:42 My application has two threads, one inserts thousands of records per

[PERFORM] Drop table vs Delete record

2007-05-22 Thread Orhan Aglagul
My application has two threads, one inserts thousands of records per second into a table (t1) and the other thread periodically deletes expired records (also in thousands) from the same table (expired ones). So, we have one thread adding a row while the other thread is trying to delete a ro

[PERFORM] Domains versus Check Constraints

2007-05-22 Thread Chander Ganesan
Are there any performance improvements that come from using a domain over a check constraint (aside from the ease of management component)? thanks -- Chander Ganesan Open Technology Group, Inc. One Copley Parkway, Suite 210 Morrisville, NC 27560 Phone: 877-258-8987/919-463-0999 -

Re: [PERFORM] Performace comparison of indexes over timestamp fields

2007-05-22 Thread Tom Lane
Arnau <[EMAIL PROTECTED]> writes: > As you can see the time difference are very big >Timestamp:318.328 ms >int8 index: 120.804 ms >double precision: 57.065 ms As already suggested elsewhere, you probably weren't sufficiently careful in taking your measurements. A look at

Re: [PERFORM] Tips & Tricks for validating hardware/os

2007-05-22 Thread PFC
Out of curiosity, can anyone share his tips & tricks to validate a machine before labelling it as 'ready to use postgres - you probably won't trash my data today' ? I'm looking for a way to stress test components especially kernel/disk to have confidence > 0 that I can use postgres on top of it.

Re: [PERFORM] Tips & Tricks for validating hardware/os

2007-05-22 Thread Alexander Staubo
On 5/22/07, Stephane Bailliez <[EMAIL PROTECTED]> wrote: Out of curiosity, can anyone share his tips & tricks to validate a machine before labelling it as 'ready to use postgres - you probably won't trash my data today' ? I'm looking for a way to stress test components especially kernel/disk to h

[PERFORM] Tips & Tricks for validating hardware/os

2007-05-22 Thread Stephane Bailliez
Hi, Out of curiosity, can anyone share his tips & tricks to validate a machine before labelling it as 'ready to use postgres - you probably won't trash my data today' ? I'm looking for a way to stress test components especially kernel/disk to have confidence > 0 that I can use postgres on top

Re: [PERFORM] Performace comparison of indexes over timestamp fields

2007-05-22 Thread Alexander Staubo
On 5/22/07, Steinar H. Gunderson <[EMAIL PROTECTED]> wrote: On Tue, May 22, 2007 at 02:39:33PM +0200, Alexander Staubo wrote: > PostgreSQL uses B-tree indexes for scalar values. For an expression > such as "t between a and b", I believe it's going to match both sides > of the table independently

Re: [PERFORM] Performace comparison of indexes over timestamp fields

2007-05-22 Thread Steinar H. Gunderson
On Tue, May 22, 2007 at 02:39:33PM +0200, Alexander Staubo wrote: > PostgreSQL uses B-tree indexes for scalar values. For an expression > such as "t between a and b", I believe it's going to match both sides > of the table independently (ie., t >= a and t <= b) and intersect > these subsets. This i

Re: [PERFORM] Performace comparison of indexes over timestamp fields

2007-05-22 Thread Alexander Staubo
On 5/22/07, Arnau <[EMAIL PROTECTED]> wrote: On older versions of PostgreSQL, at least in my experience, queries on timestamps fields even having indexes where performing quite bad mainly sequential scans where performed. PostgreSQL uses B-tree indexes for scalar values. For an expression su

Re: [PERFORM] Key/Value reference table generation: INSERT/UPDATE performance

2007-05-22 Thread cedric
Le mardi 22 mai 2007, Richard Huxton a écrit : > valgog wrote: > > I found several post about INSERT/UPDATE performance in this group, > > but actually it was not really what I am searching an answer for... > > > > I have a simple reference table WORD_COUNTS that contains the count of > > words tha

[PERFORM] Performace comparison of indexes over timestamp fields

2007-05-22 Thread Arnau
Hi all, I have some tables where all the queries that will be executed are timestamps driven, so it'd be nice to have an index over those fields. On older versions of PostgreSQL, at least in my experience, queries on timestamps fields even having indexes where performing quite bad mainly

Re: [PERFORM] Key/Value reference table generation: INSERT/UPDATE performance

2007-05-22 Thread valgog
On May 22, 12:00 pm, valgog <[EMAIL PROTECTED]> wrote: > I have rewritten the code like > > existing_words_array := ARRAY( select word >from WORD_COUNTS > where word = ANY > ( array_of_words ) ); >

Re: [PERFORM] Key/Value reference table generation: INSERT/UPDATE performance

2007-05-22 Thread valgog
On May 22, 12:14 pm, [EMAIL PROTECTED] (PFC) wrote: > On Tue, 22 May 2007 10:23:03 +0200, valgog <[EMAIL PROTECTED]> wrote: > > I found several post about INSERT/UPDATE performance in this group, > > but actually it was not really what I am searching an answer for... > > > I have a simple reference

Re: [PERFORM] Key/Value reference table generation: INSERT/UPDATE performance

2007-05-22 Thread PFC
On Tue, 22 May 2007 10:23:03 +0200, valgog <[EMAIL PROTECTED]> wrote: I found several post about INSERT/UPDATE performance in this group, but actually it was not really what I am searching an answer for... I have a simple reference table WORD_COUNTS that contains the count of words that appear

Re: [PERFORM] Postgres Benchmark Results

2007-05-22 Thread PFC
Note that while the average hits/s between 100 and 500 is over 600 tps for Postgres there is a consistent smattering of plot points spread all the way down to 200 tps, well below the 400-500 tps that MySQL is getting. Yes, these are due to checkpointing, mostly. Also, note that a re

Re: [PERFORM] Key/Value reference table generation: INSERT/UPDATE performance

2007-05-22 Thread valgog
I have rewritten the code like existing_words_array := ARRAY( select word from WORD_COUNTS where word = ANY ( array_of_words ) ); not_existing_words_array := ARRAY( select distinct_word

Re: [PERFORM] is file size relevant in choosing index or table scan?

2007-05-22 Thread Richard Huxton
Joost Kraaijeveld wrote: Hi, I have a table with a file size of 400 MB with an index of 100 MB. Does PostgreSQL take the file sizes of both the table and the index into account when determing if it should do a table or an index scan? In effect yes, although it will think in terms of row sizes

[PERFORM] is file size relevant in choosing index or table scan?

2007-05-22 Thread Joost Kraaijeveld
Hi, I have a table with a file size of 400 MB with an index of 100 MB. Does PostgreSQL take the file sizes of both the table and the index into account when determing if it should do a table or an index scan? TIA Joost ---(end of broadcast)---

Re: [PERFORM] Key/Value reference table generation: INSERT/UPDATE performance

2007-05-22 Thread Richard Huxton
valgog wrote: I found several post about INSERT/UPDATE performance in this group, but actually it was not really what I am searching an answer for... I have a simple reference table WORD_COUNTS that contains the count of words that appear in a word array storage in another table. I think this

Re: [PERFORM] Key/Value reference table generation: INSERT/UPDATE performance

2007-05-22 Thread Peter Childs
On 22 May 2007 01:23:03 -0700, valgog <[EMAIL PROTECTED]> wrote: I found several post about INSERT/UPDATE performance in this group, but actually it was not really what I am searching an answer for... I have a simple reference table WORD_COUNTS that contains the count of words that appear in a

[PERFORM] Key/Value reference table generation: INSERT/UPDATE performance

2007-05-22 Thread valgog
I found several post about INSERT/UPDATE performance in this group, but actually it was not really what I am searching an answer for... I have a simple reference table WORD_COUNTS that contains the count of words that appear in a word array storage in another table. CREATE TABLE WORD_COUNTS ( w

Re: [PERFORM] Postgres Benchmark Results

2007-05-22 Thread Gregory Stark
What's interesting here is that on a couple metrics the green curve is actually *better* until it takes that nosedive at 500 MB. Obviously it's not better on average hits/s, the most obvious metric. But on deviation and worst-case hits/s it's actually doing better. Note that while the average hit

Re: [PERFORM] Postgres Benchmark Results

2007-05-22 Thread Gregory Stark
"Alvaro Herrera" <[EMAIL PROTECTED]> writes: > Scott Marlowe wrote: >> >> I thought you were limited to 250 or so COMMITS to disk per second, and >> since >1 client can be committed at once, you could do greater than 250 >> tps, as long as you had >1 client providing input. Or was I wrong? > >

[PERFORM] Feature suggestion : FAST CLUSTER

2007-05-22 Thread PFC
Well, CLUSTER is so slow (and it doesn't cluster the toast tables associated with the table to be clustered). However, when people use CLUSTER they use it to speed up their queries. For that the table does not need to be perfectly in-order. So, here is a new idea for