Re: Unexpected (bad) performance when querying indexed JSONB column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/31/2015 11:02 AM, Christian Weyer wrote:
> Just checked: the execution time is the same when I drop the index.
> 
> Execution plan with index:
> ---
> "Bitmap Heap Scan on articles  (cost=16.25..135.64 rows=33 width=427)"
> "  Recheck Cond: (data @> '{"locked": true}'::jsonb)"
> "  ->  Bitmap Index Scan on idx_data  (cost=0.00..16.24 rows=33 width=0)"
> "        Index Cond: (data @> '{"locked": true}'::jsonb)"
> ---
> 
> And without the index:
> ---
> "Seq Scan on articles  (cost=0.00..2289.21 rows=33 width=427)"
> "  Filter: (data @> '{"locked": true}'::jsonb)"
> ---

Please send us the output of EXPLAIN ( ANALYZE ON, BUFFERS ON ) so that
we can see what the query is actually doing, rather than just what the
plan was.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux