169 похожих чатов

Hi! I have this DDL for a table, and due to

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);

1 ответов

8 просмотров

Yes, you should not create additional index

Похожие вопросы

Обсуждают сегодня

type TObj = object procedure Init; virtual; end; TObj1 = object(TObj) procedure Init; override; end; procedure TObj1.Init; begin inherited; end; procedur...
Alexander 👋
29
Есть какой-нибудь для Delphi/FPC T*Compression(Decompression)Stream на базе LZ4/Zstd/любой другой быстрый(и хорошо сжимающий) алгоритм А ещё лучше в pure pascal А ещё лучше од...
notme
45
А чем вам питонисты не угодили?😂
.
79
Можно ли загрузить скрипт py в бота чтобы он работал по нему? как это сделать?
huskadam #RCC Фанат? @hitlerpvp
13
А дин типизация это хорошо или плохо?
Alexey
12
Исходники плюс документация? Вы гоните)) демок хватит всем
zamtmn
11
Язык Си можно выучить за день? По книжке ANSI C на 230 страниц
Vincent Vegan
29
Hello. Could you please help me with finding all coordinates within a radius using a spatial index, given that I have a table with coordinates? SET @lng = 37.57925; SET @lat ...
Rinchin G
7
Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
76
а что есть "статистика" ? просто подсчет фактов обращения и времен выполнения ?
Сергей
9
Карта сайта