https://johnmosesman.com/post/querying-postgres-json-columns-with-activerecord/
查询时为了命中gin类型的索引,应该尽量使用@>的方式来查询数据:
参考:https://www.jb51.net/article/64545.htm
下图可见两中查询方式所用时间对比:
https://johnmosesman.com/post/querying-postgres-json-columns-with-activerecord/
查询时为了命中gin类型的索引,应该尽量使用@>的方式来查询数据:
参考:https://www.jb51.net/article/64545.htm
下图可见两中查询方式所用时间对比: