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

Re: Too much blocks read

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Too much blocks read
Date: 2009-11-18 16:30:44
Message-ID: 20091118163044.GA4342@a-kretschmer.de (view raw or flat)
Thread:
Lists: pgsql-performance
In response to Waldomiro :
> I?m thinking It hapens because in the 7 millions tables, the same 8k 
> block has diferent records with different keys, so only a few records 
> with 'my_key' is retrieved when I read a 8k block.
> In the part_table, all records stored in a 8k block have 'my_key', so 
> It?s much optimized.
> 
> My doubt, there is a way to defrag my 7 millions table to put all 
> records with the same key in the same 8k block?
> 
> How can I do that?

CLUSTER your table:
http://www.postgresql.org/docs/current/static/sql-cluster.html


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

In response to

pgsql-performance by date

Next:From: Kenny GormanDate: 2009-11-18 22:59:36
Subject: Re: SSD + RAID
Previous:From: Craig JamesDate: 2009-11-18 16:29:53
Subject: Re: Too much blocks read

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