postgresql 额外需要掌握的命令

1 复制老表中的字段和数据。

select * into cust_topic_keyword_220224 from cust_topic_keyword;

2查询所有索引
select * from pg_indexes where tablename='article';
3单个索引
CREATE INDEX article_guid_index ON article (guid);
4组合索引
CREATE INDEX index_guid_tmpost ON test2 (guid, tmpost);

posted @ 2022-02-24 16:28  cyyun4  阅读(26)  评论(0)    收藏  举报