From: | Venkata Balaji N <nag1010(at)gmail(dot)com> |
---|---|
To: | Patrick B <patrickbakerbr(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: PK Index - Removal |
Date: | 2016-08-11 04:24:07 |
Message-ID: | CAEyp7J-mzj2iw6KWVBEeywdie3HppE-annJskN+jb6s6HJV6ZQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Aug 11, 2016 at 1:30 PM, Patrick B <patrickbakerbr(at)gmail(dot)com> wrote:
> Hi guys,
>
> I got the following index:
>
> CREATE INDEX "ix_mo_pk" ON "mo" USING "btree" ((("id")::"text"))
>
>
> The "ID" is my primary key:
>
>> "mo_pkey" PRIMARY KEY, "btree" ("id")
>
>
> The ix_mo_pk index is not being used... But as it has the "ID" on it, I
> wanted to ask before dropping it.
>
> Can you guys explain me if the ix_mo_pk is safe to delete and why?
>
> The mo_pkey index is being used.
>
Yes, you can drop the unused Indexes provided they are not the ones created
by primary key or unique key constraints. By your explanation, it seems
that the index "ix_mo_pk" is an user defined index (created by you), so, it
can be dropped if not used.
Regards,
Venkata B N
Fujitsu Australia
From | Date | Subject | |
---|---|---|---|
Next Message | Yelai, Ramkumar | 2016-08-11 06:06:48 | pgbasebackup is failing after truncate |
Previous Message | Andreas Kretschmer | 2016-08-11 04:08:32 | Re: PK Index - Removal |