pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Samed YILDIRIM <samed@reddoc.net>
To: Ravi Tammineni <rtammineni@partner.aligntech.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: What is the best way to create Primary Key on a large table in Postgresql 9.5?
Date: Fri, 19 Aug 2016 00:05:27 +0300
Message-ID: <569661471554327@web30h.yandex.ru> (raw)
In-Reply-To: <BN1PR02MB23134DCFEF3087FA7DAF0EC80150@BN1PR02MB231.namprd02.prod.outlook.com>
References: <BN1PR02MB23134DCFEF3087FA7DAF0EC80150@BN1PR02MB231.namprd02.prod.outlook.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

<p>Hi Ravi,<br /><br />You can use CREATE INDEX with CONCURRENTLY keyword. It will not lock your table during the process.<br /><br />Best regards.<br /><br /><br /><br />İyi çalışmalar.<br />Samed YILDIRIM<br /><br /><br />19.08.2016, 00:01, "Ravi Tammineni" &lt;<a href="mailto:rtammineni@partner.aligntech.com">rtammineni@partner.aligntech.com</a>&gt;:</p><blockquote> I have to create a primary key on a large table (~100Million records). What is the best and fastest way to create pkey? This column is a sequence column and i don't want to lock the table because this is highly transactional database.<br /><br /> Thanks<br /><br /> ravi</blockquote>




view thread (9+ messages)  latest in thread

Message-ID: <569661471554327@web30h.yandex.ru>
Permalink:  ../569661471554327@web30h.yandex.ru/
Also on:    postgresql.org/message-id/569661471554327@web30h.yandex.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: samed@reddoc.net, rtammineni@partner.aligntech.com
  Subject: Re: What is the best way to create Primary Key on a large table in Postgresql 9.5?
  In-Reply-To: <569661471554327@web30h.yandex.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox