explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tVlM

Settings
# exclusive inclusive rows x rows loops node
1. 0.020 13,839.196 ↑ 2,892.2 4 1

Sort (cost=23,950.71..23,979.64 rows=11,569 width=48) (actual time=13,839.195..13,839.196 rows=4 loops=1)

  • Sort Key: tiktok."time
  • Sort Method: quicksort Memory: 25kB
2. 13,544.558 13,839.176 ↑ 2,892.2 4 1

Hash Semi Join (cost=5,804.18..23,169.92 rows=11,569 width=48) (actual time=13,454.438..13,839.176 rows=4 loops=1)

  • Hash Cond: (((tiktok.json ->> 'id'::text))::bigint = q.id)
3. 294.375 294.375 ↑ 1.0 462,770 1

Seq Scan on tiktok (cost=0.00..15,057.70 rows=462,770 width=126) (actual time=0.036..294.375 rows=462,770 loops=1)

4. 0.006 0.243 ↑ 5.0 1 1

Hash (cost=5,804.11..5,804.11 rows=5 width=8) (actual time=0.243..0.243 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
5. 0.001 0.237 ↑ 5.0 1 1

Subquery Scan on q (cost=5,804.03..5,804.11 rows=5 width=8) (actual time=0.235..0.237 rows=1 loops=1)

6. 0.000 0.236 ↑ 5.0 1 1

Limit (cost=5,804.03..5,804.06 rows=5 width=16) (actual time=0.235..0.236 rows=1 loops=1)

7. 0.002 0.236 ↑ 2,314.0 1 1

Unique (cost=5,804.03..5,821.38 rows=2,314 width=16) (actual time=0.234..0.236 rows=1 loops=1)

8. 0.007 0.234 ↑ 578.5 4 1

Sort (cost=5,804.03..5,809.81 rows=2,314 width=16) (actual time=0.233..0.234 rows=4 loops=1)

  • Sort Key: (to_timestamp((((tiktok_1.json -> 'createTime'::text))::integer)::double precision)) DESC, (((tiktok_1.json ->> 'id'::text))::bigint)
  • Sort Method: quicksort Memory: 25kB
9. 0.168 0.227 ↑ 578.5 4 1

Bitmap Heap Scan on tiktok tiktok_1 (cost=54.36..5,674.72 rows=2,314 width=16) (actual time=0.118..0.227 rows=4 loops=1)

  • Recheck Cond: (((json -> 'author'::text) ->> 'uniqueId'::text) = 'lilweehag'::text)
  • Heap Blocks: exact=3
10. 0.059 0.059 ↑ 578.5 4 1

Bitmap Index Scan on tiktok_author (cost=0.00..53.78 rows=2,314 width=0) (actual time=0.059..0.059 rows=4 loops=1)

  • Index Cond: (((json -> 'author'::text) ->> 'uniqueId'::text) = 'lilweehag'::text)