阅读背景:

为什么这个查询在JSONB Gin索引字段上花了这么长时间?我可以修复它以便实际使用索引吗?

来源:互联网 

Recently we changed the format of one of our tables from using a single entry in a column to having a JSONB column in the format of ["key1","key2","key3"] etc. Although we built a GIN index on the JSONB field the queries that we use on it are EXTREMELY slow (in the range of 50 minutes in explain plan). I am trying to find out a way to optimize the query and to correctly utilize the index. I pasted the query below as well as the explain plan for it. The indexed fields are visit.visitor, launch.campaign_key, launch.launch_key, visit.store_key and visits.stop JSONB field as GIN index. We are using PostgresQL 9.4Recently we changed the format of one of our ta




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: