Search Postgresql Archives

Should I create an index for partition with fixed key?

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

 



Hello.

Some days ago I started using partitioning to make it possible to work
with large amount of data.

I created master table as documentation suggest, created some child
tables which inherit from the master one and then added a constraint
for each child table to define the allowed key value. Constraint was
like:

CHECK (site_id = 'google_com')

Now here is my question:

While reading the documentation I came across the following
suggestion: "For each partition, create an index on the key column(s)"

Should I do that if the key will be the same for the whole partition?
Will there be any benefits of having an index on site_id column?

When I first read it, I decided that if all rows have the same key
(say site_id = 'google_com') then there is no need in index.

Thanks.

-- 
Sergey Samokhin

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux