postgresql create table with index
CREATE INDEX index_name
ON table_name (column_name);
postgresql create table with index
CREATE INDEX index_name
ON table_name (column_name);
create index concurrently postgres
create index concurrently [index_name] on [table_name]([column_name]);
postgresql index id
postgres@db # SELECT a.attname
FROM pg_class t
JOIN pg_index ix ON t.oid = ix.indrelid
JOIN pg_class i ON i.oid = ix.indexrelid
JOIN pg_attribute a ON a.attrelid = t.oid
WHERE
a.attnum = ANY(ix.indkey) AND
t.relkind = 'r' AND
t.relname ='test' -- table name
ORDER BY
t.relname,
i.relname;
attname
---------
column1
column2
id
(3 rows)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us