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

Re: Same query doing slow then quick

From: Undertaker Rude <ffw_rude(at)hotmail(dot)com>
To: <lystor(at)gmail(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Same query doing slow then quick
Date: 2012-09-27 08:33:33
Message-ID: SNT111-W32B747BB89423F7197F456E1830@phx.gbl (view raw or flat)
Thread:
Lists: pgsql-performance
Oh ok. But what is this command doing ? i'm gonna runn it today. I'll keep you posted. Here is some EXPLAIN ANALYZE from the querys :

Nested Loop  (cost=0.00..353722.89 rows=124893 width=16) (actual time=261158.061..10304193.501 rows=99 loops=1)  Join Filter: ((t2."X" >= (t1.x_min)::double precision) AND (t2."X" <= (t1.x_max)::double precision) AND (t2."Y" >= (t1.y_min)::double precision) AND (t2."Y" <= (t1.y_max)::double precision))  ->  Seq Scan on gps_22 t1  (cost=0.00..3431.80 rows=177480 width=44) (actual time=0.036..1399.621 rows=177480 loops=1)  ->  Materialize  (cost=0.00..20572.83 rows=57 width=20) (actual time=0.012..10.274 rows=2924 loops=177480)        ->  Seq Scan on adresses_22 t2  (cost=0.00..20572.55 rows=57 width=20) (actual time=1570.240..1726.376 rows=2924 loops=1)              Filter: ((id_maille_200m)::text = '0'::text)Total runtime: 10304211.648 ms

Nested Loop  (cost=0.00..88186069.17 rows=33397899 width=16) (actual time=3060.373..3060.373 rows=0 loops=1)  Join Filter: ((t2."X" >= (t1.x_min)::double precision) AND (t2."X" <= (t1.x_max)::double precision) AND (t2."Y" >= (t1.y_min)::double precision) AND (t2."Y" <= (t1.y_max)::double precision))  ->  Seq Scan on gps_31 t1  (cost=0.00..3096.38 rows=161738 width=44) (actual time=4.612..442.935 rows=161738 loops=1)  ->  Materialize  (cost=0.00..12562.25 rows=16726 width=20) (actual time=0.012..0.012 rows=0 loops=161738)        ->  Seq Scan on adresses_31 t2  (cost=0.00..12478.62 rows=16726 width=20) (actual time=1504.082..1504.082 rows=0 loops=1)              Filter: ((id_maille_200m)::text = '0'::text)Total runtime: 3060.469 ms
Nested Loop  (cost=0.00..84287659.70 rows=31920943 width=64) (actual time=220198.891..32665395.631 rows=21409 loops=1)  Join Filter: ((t2."X" >= (t1.x_min)::double precision) AND (t2."X" <= (t1.x_max)::double precision) AND (t2."Y" >= (t1.y_min)::double precision) AND (t2."Y" <= (t1.y_max)::double precision))  ->  Seq Scan on gps_67 t1  (cost=0.00..2350.55 rows=121555 width=44) (actual time=0.038..1570.994 rows=121555 loops=1)  ->  Materialize  (cost=0.00..14072.09 rows=21271 width=20) (actual time=0.001..34.394 rows=22540 loops=121555)        ->  Seq Scan on adresses_67 t2  (cost=0.00..13965.74 rows=21271 width=20) (actual time=0.032..1283.087 rows=22540 loops=1)              Filter: ((id_maille_200m)::text = '0'::text)Total runtime: 32665478.631 ms

Rude - Last Territory
Ou ├ęcouter ?http://www.deezer.com/fr/music/last-territory/the-last-hope-3617781	      (Post-apocalyptic Metal)http://www.deezer.com/fr/music/rude-undertaker    (Pop-Rock)
Ou acheter ?La Fnachttp://recherche.fnac.com/fmia14622213/Last-Territory
http://recherche.fnac.com/fmia14770622/Rude-Undertaker

iTuneshttp://itunes.apple.com/us/artist/last-territory/id533857009?ign-mpt=uo%3D4


> Date: Wed, 26 Sep 2012 19:30:30 +0300
> Subject: Re: [PERFORM] Same query doing slow then quick
> From: lystor(at)gmail(dot)com
> To: FFW_Rude(at)hotmail(dot)com
> CC: pgsql-performance(at)postgresql(dot)org
> 
> On 26 September 2012 19:09, FFW_Rude <FFW_Rude(at)hotmail(dot)com> wrote:
> > Could you explain what you are asking me to do because i don't really know
> > what i'm doing...
> 
> postgresql-contrib packages contains pgbench tool on Ubuntu.
> 
> For example postgresql-contrib-9.1_9.1.3-2_i386.deb on Ubuntu 12.04 contains:
> /usr/lib/postgresql/9.1/bin/pgbench
> 
> 
> > i don't have pgbench in it. It is still pgbench command not found...
> 
> You need to run pgbench as postgres user.
> For example on CentOS:
> # su - postgres
> $ pgbench -i pgbench && pgbench -c 10 -t 10000 pgbench
> 
> 
> --
> With best regards,
> Nikolay
 		 	   		  

In response to

Responses

pgsql-performance by date

Next:From: Undertaker RudeDate: 2012-09-27 09:01:48
Subject: Re: Same query doing slow then quick
Previous:From: Andres FreundDate: 2012-09-27 06:59:09
Subject: Re: Memory issues

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