create index does change pages?

Started by mohsen soodkhah mohammadiover 12 years ago3 messages
#1mohsen soodkhah mohammadi
mohsensoodkhah@gmail.com

hello.
dose one create index on the large table changes the place of some tuples
in some pages?

#2Heikki Linnakangas
hlinnakangas@vmware.com
In reply to: mohsen soodkhah mohammadi (#1)
Re: create index does change pages?

On 20.07.2013 12:56, mohsen soodkhah mohammadi wrote:

hello.
dose one create index on the large table changes the place of some tuples
in some pages?

No, creating an index doesn't move any tuples in the heap.

- Heikki

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

#3Atri Sharma
atri.jiit@gmail.com
In reply to: mohsen soodkhah mohammadi (#1)
Re: create index does change pages?

Sent from my iPad

On 20-Jul-2013, at 15:26, mohsen soodkhah mohammadi <mohsensoodkhah@gmail.com> wrote:

hello.
dose one create index on the large table changes the place of some tuples in some pages?

No, making an index involves keeping some metadata about your tables in an auxiliary data structure. It will require some extra memory for the auxiliary data structure, but there is no moving of the actual tuples.

Regards,

Atri

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