Re: [GENERAL] Postgresql simple query performance question

2007-11-07 Thread Reg Me Please
Il Wednesday 07 November 2007 13:47:26 SHARMILA JOTHIRAJAH ha scritto: > Hi > we are testing with version PostgreSQL 8.2.3. Why not using at least the current 8.2.5? Read here http://www.postgresql.org/docs/current/static/release.html for details. -- Reg me Please ---

Re: [GENERAL] Postgresql simple query performance question

2007-11-07 Thread SHARMILA JOTHIRAJAH
From: Simon Riggs <[EMAIL PROTECTED]> To: Bill Moran <[EMAIL PROTECTED]> Cc: SHARMILA JOTHIRAJAH <[EMAIL PROTECTED]>; pgsql-general@postgresql.org Sent: Wednesday, November 7, 2007 6:34:26 AM Subject: Re: [GENERAL] Postgresql simple query performance question On Tue, 2007-11

Re: [GENERAL] Postgresql simple query performance question

2007-11-07 Thread SHARMILA JOTHIRAJAH
<[EMAIL PROTECTED]> To: SHARMILA JOTHIRAJAH <[EMAIL PROTECTED]> Cc: Pavel Stehule <[EMAIL PROTECTED]>; pgsql-general@postgresql.org Sent: Tuesday, November 6, 2007 8:03:48 PM Subject: Re: [GENERAL] Postgresql simple query performance question "SHARMILA JOTHIRAJAH" <

Re: [GENERAL] Postgresql simple query performance question

2007-11-07 Thread Simon Riggs
On Tue, 2007-11-06 at 09:29 -0500, Bill Moran wrote: > In response to SHARMILA JOTHIRAJAH <[EMAIL PROTECTED]>: > > > Hi > > We are in the process of testing for migration of our database from Oracle > > to Postgresql. > > I hava a simple query > > > > Select count(*) from foo > > This is asked

Re: [GENERAL] Postgresql simple query performance question

2007-11-07 Thread Reg Me Please
Il Wednesday 07 November 2007 13:08:46 André Volpato ha scritto: > > > > > > > > Reid Thompson escreveu: Would it be possible to avoid the so-called "HTML email body"? -- Reg me Please ---(end of broadcast)--- TIP 9: In versions below 8

Re: [GENERAL] Postgresql simple query performance question

2007-11-07 Thread André Volpato
Reid Thompson escreveu: On Tue, 2007-11-06 at 14:39 -0300, André Volpato wrote: Remember that you can always use serial fields to count a table, like: alter table foo add id serial; select id from foo order by id desc limit 1; This should return the same value than count(*), in

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Gregory Stark
"SHARMILA JOTHIRAJAH" <[EMAIL PROTECTED]> writes: > I understand that. But why is that when oracle is given a hint to do full > table scan instead of using index to get the count, it is still faster than > postgres when both has the same explain plan? Oracle takes 34 sec and > postgres takes 1 m10

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Bill Moran
In response to André Volpato <[EMAIL PROTECTED]>: > Richard Huxton escreveu: > > Reg Me Please wrote: > >> While I would not spend resources in fine tuning the count(*), I would > >> spend some to underastand why and how the other ones do it better. > >> > >> Just to be better. > > > > The problem

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread André Volpato
Richard Huxton escreveu: Reg Me Please wrote: While I would not spend resources in fine tuning the count(*), I would spend some to underastand why and how the other ones do it better. Just to be better. The problem is well understood, and there is extensive discussion in the mailing lists ar

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Gokulakannan Somasundaram
ain > sharmila > > > > ----- Original Message > From: Pavel Stehule <[EMAIL PROTECTED]> > To: SHARMILA JOTHIRAJAH <[EMAIL PROTECTED]> > Cc: pgsql-general@postgresql.org > Sent: Tuesday, November 6, 2007 9:11:02 AM > Subject: Re: [GENERAL] Postgresql simple que

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Richard Huxton
Reg Me Please wrote: While I would not spend resources in fine tuning the count(*), I would spend some to underastand why and how the other ones do it better. Just to be better. The problem is well understood, and there is extensive discussion in the mailing lists archives. The basic problem

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread SHARMILA JOTHIRAJAH
pgsql-general@postgresql.org Sent: Tuesday, November 6, 2007 9:11:02 AM Subject: Re: [GENERAL] Postgresql simple query performance question Hello PostgreSQL doesn't use index for COUN(*) http://www.varlena.com/GeneralBits/18.php http://sql-info.de/en/postgresql/postgres-gotchas.html#1_7 Regards

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Reg Me Please
While I would not spend resources in fine tuning the count(*), I would spend some to underastand why and how the other ones do it better. Just to be better. Il Tuesday 06 November 2007 15:29:34 Bill Moran ha scritto: > In response to Reg Me Please <[EMAIL PROTECTED]>: > > I have no doubt you're r

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Bill Moran
In response to Reg Me Please <[EMAIL PROTECTED]>: > I have no doubt you're right, Pavel. > But why not? > It could be a simple enhacement. It's not simple. Do some searches on the mailing lists and you will find discussion of why it's difficult to do. > > Il Tuesday 06 November 2007 15:11:02 P

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Bill Moran
In response to SHARMILA JOTHIRAJAH <[EMAIL PROTECTED]>: > Hi > We are in the process of testing for migration of our database from Oracle to > Postgresql. > I hava a simple query > > Select count(*) from foo This is asked a lot. The quick answer is that PostgreSQL method of MVCC makes it impos

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Reg Me Please
I have no doubt you're right, Pavel. But why not? It could be a simple enhacement. Il Tuesday 06 November 2007 15:11:02 Pavel Stehule ha scritto: > Hello > > PostgreSQL doesn't use index for COUN(*) > > http://www.varlena.com/GeneralBits/18.php > http://sql-info.de/en/postgresql/postgres-gotchas.h

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Pavel Stehule
Hello PostgreSQL doesn't use index for COUN(*) http://www.varlena.com/GeneralBits/18.php http://sql-info.de/en/postgresql/postgres-gotchas.html#1_7 Regards Pavel Stehule On 06/11/2007, SHARMILA JOTHIRAJAH <[EMAIL PROTECTED]> wrote: > > Hi > We are in the process of testing for migration of our