a constraint, Postgres itself generates a unique index (automatically):
CREATE TABLE public.maiquel_midia
(
seqmidia serial4 NOT NULL,
midia varchar(255) NOT NULL,
regra bool NOT NULL,
margem numeric(12, 3) NULL,
competitividade numeric(12, 3) NULL,
oculto bool NOT NULL,
CONSTRAINT maiquel_midia_pkey PRIMARY KEY (seqmidia)
);
The automatic generated index is (pg_catalog.pg_indexes):
CREATE UNIQUE INDEX maiquel_midia_pkey ON public.maiquel_midia USING btree (seqmidia)
Is it redundant for me to create another index?
CREATE INDEX maiquel_midia_seqmidia_idx ON public.maiqwuel_midia USING btree (seqmidia);
Yes, you should not create additional index
Обсуждают сегодня