Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: EXPLAIN out...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 8 Topic 3132 of 3255
Post > Topic >>

Re: EXPLAIN output explanation requested

by ron.arts@[EMAIL PROTECTED] (Ron Arts) Jun 3, 2008 at 07:51 PM

A. Kretschmer schreef:
> am  Tue, dem 03.06.2008, um 12:35:34 +0200 mailte A. Kretschmer
folgendes:
>> I guess, you have much insert/delete or update - operations on this
>> table and no recent vacuum.
>>
>> Try to run a 'vacuum full;' and re-run your query. And, run a 'explain
>> analyse <your query>' to see the estimated costs and the real costs. 
> 
> Btw, run 'select relpages, reltuples from pg_class where
relname='phone'; 
> before and after the 'vacuum full' and show us the result.
> 
> 
> Andreas

I did a vacuum without success, but `vacuum full` did the trick:

tium=# select relpages, reltuples from pg_class where relname='phone';
  relpages | reltuples
----------+-----------
     85876 |       658
(1 row)
tium=# vacuum full;
VACUUM
tium=# select relpages, reltuples from pg_class where relname='phone';
  relpages | reltuples
----------+-----------
        17 |       248
(1 row)

tium=# explain analyze select codec1, phonetype from phone;
                                              QUERY PLAN
-----------------------------------------------------------------------------------------------------
  Seq Scan on phone  (cost=0.00..76.77 rows=977 width=11) (actual
time=0.007..0.751 rows=248 loops=1)
  Total runtime: 0.957 ms
(2 rows)

tium=#

What do those values relpages and reltuples mean?

Thanks,
Ron


-- 
NeoNova BV, The Netherlands
Professional internet and VoIP solutions

http://www.neonova.nl
  Kruislaan 419              1098 VA Amsterdam
info: 020-5628292       servicedesk: 020-5628292   fax: 020-5628291
KvK Amsterdam 34151241

The following disclaimer applies to this email:
http://www.neonova.nl/maildisclaimer


-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 8 Posts in Topic:
EXPLAIN output explanation requested
ron.arts@[EMAIL PROTECTED  2008-06-03 11:56:39 
Re: EXPLAIN output explanation requested
andreas.kretschmer@[EMAIL  2008-06-03 12:35:34 
Re: EXPLAIN output explanation requested
andreas.kretschmer@[EMAIL  2008-06-03 12:52:28 
Re: EXPLAIN output explanation requested
ron.arts@[EMAIL PROTECTED  2008-06-03 13:10:10 
Re: EXPLAIN output explanation requested
ron.arts@[EMAIL PROTECTED  2008-06-03 19:51:05 
Re: EXPLAIN output explanation requested
andreas.kretschmer@[EMAIL  2008-06-03 20:24:58 
Re: EXPLAIN output explanation requested
andreas.kretschmer@[EMAIL  2008-06-03 20:28:39 
Re: EXPLAIN output explanation requested
andreas.kretschmer@[EMAIL  2008-06-04 09:42:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 6:21:38 CDT 2008.