Thread: what happens to indexes when TRUNCATEing

what happens to indexes when TRUNCATEing

From
"Willy-Bas Loos"
Date:
What happens to indexes on a table that is TRUNCATEd?

WBL
--
"Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw

Re: what happens to indexes when TRUNCATEing

From
Alvaro Herrera
Date:
Willy-Bas Loos escribió:
> What happens to indexes on a table that is TRUNCATEd?

They are truncated too.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

what happens to indexes when TRUNCATEing

From
"Willy-Bas Loos"
Date:
>> What happens to indexes on a table that is TRUNCATEd?
>They are truncated too.
From the manual:
"Furthermore, [truncate] reclaims disk space immediately, rather than requiring a subsequent VACUUM operation."
Does this go for indexes too?

Thx,


WBL

--
"Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw

Re: what happens to indexes when TRUNCATEing

From
Alvaro Herrera
Date:
Willy-Bas Loos escribió:
> >> What happens to indexes on a table that is TRUNCATEd?
> >They are truncated too.
> From the manual:
> "Furthermore, [truncate] reclaims disk space immediately, rather than
> requiring a subsequent VACUUM operation."
> Does this go for indexes too?

Yes.

--
Alvaro Herrera                 http://www.amazon.com/gp/registry/DXLWNGRJD34J
"El sabio habla porque tiene algo que decir;
el tonto, porque tiene que decir algo" (Platon).

Re: what happens to indexes when TRUNCATEing

From
"Grzegorz Jaśkiewicz"
Date:
On Wed, Dec 17, 2008 at 11:37 AM, Willy-Bas Loos <willybas@gmail.com> wrote:
>>> What happens to indexes on a table that is TRUNCATEd?
>>They are truncated too.
> From the manual:
> "Furthermore, [truncate] reclaims disk space immediately, rather than
> requiring a subsequent VACUUM operation."
> Does this go for indexes too?
>
someone asked the same question here not so long time ago. The answer
is - yes, it applies to indices too.



--
GJ

Re: what happens to indexes when TRUNCATEing

From
"Willy-Bas Loos"
Date:
>> What happens to indexes on a table that is TRUNCATEd?
>They are truncated too.
From the manual:
"Furthermore, [truncate] reclaims disk space immediately, rather than requiring a subsequent VACUUM operation."
Does this go for indexes too?

Thx,

WBL

--
"Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw

Re: what happens to indexes when TRUNCATEing

From
"Willy-Bas Loos"
Date:
>someone asked the same question here not so long time ago
Sorry about that, I searched my personal archive, which  goes back until oct 2006, and google, before I asked.
Must have missed it then.

Thx for the insight!

WBL

--
"Patriotism is the conviction that your country is superior to all others because you were born in it." -- George Bernard Shaw

Re: what happens to indexes when TRUNCATEing

From
"Grzegorz Jaśkiewicz"
Date:
On Wed, Dec 17, 2008 at 4:44 PM, Willy-Bas Loos <willybas@gmail.com> wrote:
>>someone asked the same question here not so long time ago
> Sorry about that, I searched my personal archive, which  goes back until oct
> 2006, and google, before I asked.
> Must have missed it then.

must have been either irc or -hackers :P


--
GJ