PostgreSQL的like 'xxx%' 查询为啥默认不走索引呢?需要 trgm 扩展 gin 索引才行,示例如下:
CREATE EXTENSION pg_trgm; CREATE INDEX third_acco_trgm_gist_idx ON customer_establish_account USING GiST(third_acco GiST_trgm_ops);