Re: how postgresql request the computer resources
От | Richard Huxton |
---|---|
Тема | Re: how postgresql request the computer resources |
Дата | |
Msg-id | 4360F8C1.4040202@archonet.com обсуждение исходный текст |
Ответ на | how postgresql request the computer resources (Sidar López Cruz <sidarlopez@hotmail.com>) |
Ответы |
Re: how postgresql request the computer resources
|
Список | 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
В списке pgsql-performance по дате отправления: