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

Re: Same query doing slow then quick

From: FFW_Rude <FFW_Rude(at)hotmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Same query doing slow then quick
Date: 2012-09-26 15:38:58
Message-ID: SNT111-W2025F9BE2B94A56FE1CE13E19C0@phx.gbl (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
root(at)testBI:/etc/postgresql/9.1/main# hdparm -tT /dev/sda
/dev/sda: Timing cached reads:   892 MB in  2.01 seconds = 444.42 MB/sec Timing buffered disk reads: 190 MB in  3.02 seconds =  62.90 MB/sec
Is fsync off by default ? I have#fsync = on (so it's off right ?).
pgbench is not found on my server. Do i have to apt-get install pgbench ?
Rude - Last Territory
Ou ├ęcouter ?	      (Post-apocalyptic Metal)    (Pop-Rock)
Ou acheter ?La Fnac


Date: Wed, 26 Sep 2012 08:34:06 -0700
From: ml-node+s1045698n5725533h83(at)n5(dot)nabble(dot)com
To: FFW_Rude(at)hotmail(dot)com
Subject: Re: Same query doing slow then quick

	Hi, FFW_Rude
1. Benchmark the device with your PostgreSQL DB:
# hdparm -tT /dev/sda
/dev/sda: Timing cached reads:   6604 MB in  2.00 seconds = 3303.03 MB/sec
 Timing buffered disk reads: 1316 MB in  3.00 seconds = 438.18 MB/sec

2. Benchmark your PostgreSQL with pgbench:
Set "fsync = off" on /var/lib/pgsql/data/postgresql.conf
# /etc/init.d/postgresql restart
# su - postgres$ psql# create database pgbench;# \q# pgbench -i pgbench && pgbench -c 10 -t 10000 pgbench
tps = 5670.635648 (including connections establishing)tps = 5673.630345 (excluding connections establishing)[/code]
Set "fsync = on" on /var/lib/pgsql/data/postgresql.conf
# /etc/init.d/postgresql restart

--With best regards,Nikolay



		If you reply to this email, your message will be added to the discussion below:
		To unsubscribe from Same query doing slow then quick, click here.


View this message in context:
Sent from the PostgreSQL - performance mailing list archive at

In response to


pgsql-performance by date

Next:From: Bruce MomjianDate: 2012-09-26 15:52:12
Subject: Re: [PERFORM] Planner selects different execution plans depending on limit
Previous:From: Nikolay UlyanitskyDate: 2012-09-26 15:33:29
Subject: Re: Same query doing slow then quick

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