Re: [PERFORM] Benchmark shows very slow bulk delete

2010-01-27 Thread Greg Smith
Kevin Grittner wrote: It is if you don't have an index on the table which has a foreign key defined which references the table in which you're doing deletes. The author of the benchmark apparently didn't realize that MySQL automatically adds such an index to the dependent table, while PostgreSQL

Re: [PERFORM] Benchmark shows very slow bulk delete

2010-01-27 Thread James Mansion
Ivan Voras wrote: I wish that, when people got the idea to run a simplistic benchmark like this, they would at least have the common sense to put the database on a RAM drive to avoid problems with different cylinder speeds of rotational media and fragmentation from multiple runs. Huh? It's to

Re: [PERFORM] Should the optimiser convert a CASE into a WHERE if it can?

2010-01-27 Thread Віталій Тимчишин
27 січня 2010 р. 19:01 Matthew Wakeling написав: > On Wed, 27 Jan 2010, Віталій Тимчишин wrote: > >> How about SELECT SUM (case when id > 120 and id < 121 then 1 end) >> from tbl_tracker; >> > > That is very interesting. > > > * All the functions should be noop for null input >> > > Ala

Re: [PERFORM] Should the optimiser convert a CASE into a WHERE if it can?

2010-01-27 Thread Matthew Wakeling
On Wed, 27 Jan 2010, Віталій Тимчишин wrote: How about SELECT SUM (case when id > 120 and id < 121 then 1 end) from tbl_tracker; That is very interesting. * All the functions should be noop for null input Alas, not true for COUNT(*), AVG(), etc. Matthew -- An optimist sees the gl

Re: [PERFORM] Should the optimiser convert a CASE into a WHERE if it can?

2010-01-27 Thread Віталій Тимчишин
2010/1/26 Matthew Wakeling > On Tue, 26 Jan 2010, Richard Neill wrote: > >> SELECT SUM (case when id > 120 and id < 121 then 1 else 0 end) >> from tbl_tracker; >> >> Explain shows that this does a sequential scan. >> > > I'd defer to Tom on this one, but really, for Postgres to work this

Re: [PERFORM] Benchmark shows very slow bulk delete

2010-01-27 Thread Andres Freund
On Wednesday 27 January 2010 15:49:06 Matthew Wakeling wrote: > On Wed, 27 Jan 2010, Thom Brown wrote: > > Had a quick look at a benchmark someone put together of MySQL vs > > PostgreSQL, and while PostgreSQL is generally faster, I noticed the bulk > > delete was very slow: > > http://www.randombug

Re: [PERFORM] test send (recommended by Dave Page)

2010-01-27 Thread Dave Page
On Wed, Jan 27, 2010 at 3:33 PM, Mark Steben wrote: > Hi all – sorry to create additional email ‘noise’ > > But I’ve been trying to post a rather long query to > > The pgsql-performance user list.  Dave thought > > That it might have been bounced due to the length > > And suggested I send a short

Re: [PERFORM] Benchmark shows very slow bulk delete

2010-01-27 Thread Nikolas Everett
On Wed, Jan 27, 2010 at 9:54 AM, Kevin Grittner wrote: > It is if you don't have an index on the table which has a foreign > key defined which references the table in which you're doing > deletes. The author of the benchmark apparently didn't realize that > MySQL automatically adds such an index

Re: [PERFORM] test send (recommended by Dave Page)

2010-01-27 Thread Matthew Wakeling
On Wed, 27 Jan 2010, Mark Steben wrote: Subject: [PERFORM] test send (recommended by Dave Page) Hi all - sorry to create additional email 'noise' But I've been trying to post a rather long query to The pgsql-performance user list. Dave thought That it might have been bounced due to the lengt

[PERFORM] test send (recommended by Dave Page)

2010-01-27 Thread Mark Steben
Hi all - sorry to create additional email 'noise' But I've been trying to post a rather long query to The pgsql-performance user list. Dave thought That it might have been bounced due to the length And suggested I send a short 'blast' If this works I'll send a shortened version of my query

Re: [PERFORM] Benchmark shows very slow bulk delete

2010-01-27 Thread Kevin Grittner
Thom Brown wrote: > Had a quick look at a benchmark someone put together of MySQL vs > PostgreSQL, and while PostgreSQL is generally faster, I noticed > the bulk delete was very slow: > http://www.randombugs.com/linux/mysql-postgresql-benchmarks.html > > Is this normal? It is if you don't hav

Re: [PERFORM] Benchmark shows very slow bulk delete

2010-01-27 Thread Matthew Wakeling
On Wed, 27 Jan 2010, Thom Brown wrote: Had a quick look at a benchmark someone put together of MySQL vs PostgreSQL, and while PostgreSQL is generally faster, I noticed the bulk delete was very slow: http://www.randombugs.com/linux/mysql-postgresql-benchmarks.html Is this normal? On the contrar

Re: [PERFORM] Benchmark shows very slow bulk delete

2010-01-27 Thread Ivan Voras
On 01/27/10 14:28, Thom Brown wrote: Had a quick look at a benchmark someone put together of MySQL vs PostgreSQL, and while PostgreSQL is generally faster, I noticed the bulk delete was very slow: http://www.randombugs.com/linux/mysql-postgresql-benchmarks.html I wish that, when people got the

[PERFORM] Benchmark shows very slow bulk delete

2010-01-27 Thread Thom Brown
Had a quick look at a benchmark someone put together of MySQL vs PostgreSQL, and while PostgreSQL is generally faster, I noticed the bulk delete was very slow: http://www.randombugs.com/linux/mysql-postgresql-benchmarks.html Is this normal? Thom