Paritioning vs. caching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am evaluating a materialized view implemented as partitioned table.
At the moment the table is partitioned yearly and contains 5
numeric/timestamp columns. One of the columns is ID (but it's not what
the table is partitioned on).

Partition for one year occupies about 1200 MB. Each of the columns is
indexed, with each index weighing about 160 MB. I am trying to avoid
RAM/disk thrashing. Now I have the following questions:

1. When I query the table by ID, it performs index scan on each
partition. The result is only found in one partition, but I understand
why it needs to look in all of them. How much disk reading does it
involve? Is only the "head" of indexes for partitions that do not
include the row scanned, or are always whole indexes read? I would
like to know the general rule for index scans.

2. Is it possible to tell which PG objects are read from disk (because
they were not found in RAM)?

Thank you.

-- 
Konrad Garus

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux