Skip site navigation (1) Skip section navigation (2)

Re: how postgresql request the computer resources

From: Richard Huxton <dev(at)archonet(dot)com>
To: Sidar López Cruz <sidarlopez(at)hotmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: how postgresql request the computer resources
Date: 2005-10-27 15:56:49
Message-ID: 4360F8C1.4040202@archonet.com (view raw or flat)
Thread:
Lists: pgsql-performance
Sidar López Cruz wrote:
> Is there something that tells postgres to take the resorces from 
> computer (RAM, HDD, SWAP on linux) as it need, not modifying variables 
> on postgresql.conf and other operating system things?

Ah, and how is it to know what to share with other processes?

> A days ago i am trying to show that postgres is better than mssql but 
> when execute a simple query like:
> 
> (1)
> select count(*) from
> Total runtime: 134552.325 ms
> 
> (2)
> select count(*) from fotos where archivo not in (select archivo from 
> Total runtime: 26747.236 ms
> 
> (3)
> select count(1) from fotos f where not exists (select a.archivo from 
> Total runtime: 89765.714 ms
> 
> (4)
> SELECT count(*)
> Total runtime: 114893.116 ms

> WITH ANY OF THIS QUERIES MSSQL TAKES NOT MUCH OF 7 SECONDS....

In which case they make a bad choice for showing PostgreSQL is faster 
than MSSQL. Is this the only query you have, or are others giving you 
problems too?

I think count(*) is about the weakest point in PG, but I don't think 
there'll be a general solution available soon. As I'm sure someone has 
mentioned, whatever else, PG needs to check the row for its visibility 
information.

 From the start of your email, you seem to suspect your configuration 
needs some work. Once you are happy that your settings in general are 
good, you can override some by issuing set statements before your query. 
For example:
	SET work_mem = 10000;
might well improve example #2 where you had a hash.

--
   Richard Huxton
   Archonet Ltd


In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2005-10-27 16:18:03
Subject: Re: Update using primary key slow
Previous:From: DenisDate: 2005-10-27 15:41:22
Subject: Update using primary key slow

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group