1.创建gin类型的索引 postgresql 创建gin索引遇到的问题:1.ERROR: operator class "gin_trgm_ops" does not exist for access method "gin" 解决方案:先执行 CREATE EXTENSION pg_trgm; https://www.cnblogs.com/goingforward/p/10386979.html
一.未做索引的查询效率 作为对比,先对未索引的查询做测试 EXPLAIN ANALYZE select * from gallery_map where author = '曹志耘'; QUERY PLAN ----------------------------------------------------------------------------------------------------------------- Seq Scan on gallery_map (cost=0.