explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6Dc6

Settings
# exclusive inclusive rows x rows loops node
1. 2.856 25,140.852 ↑ 6.6 1,761 1

Sort (cost=23,949.91..23,978.83 rows=11,568 width=48) (actual time=25,140.754..25,140.852 rows=1,761 loops=1)

  • Sort Key: tiktok."time
  • Sort Method: quicksort Memory: 186kB
2. 12,619.603 25,137.996 ↑ 6.6 1,761 1

Hash Semi Join (cost=5,804.18..23,169.19 rows=11,568 width=48) (actual time=24,330.489..25,137.996 rows=1,761 loops=1)

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

Seq Scan on tiktok (cost=0.00..15,057.20 rows=462,720 width=126) (actual time=0.031..265.351 rows=462,770 loops=1)

4. 0.020 12,253.042 ↑ 1.0 5 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
5. 0.005 12,253.022 ↑ 1.0 5 1

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

6. 0.002 12,253.017 ↑ 1.0 5 1

Limit (cost=5,804.03..5,804.06 rows=5 width=16) (actual time=12,252.442..12,253.017 rows=5 loops=1)

7. 0.350 12,253.015 ↑ 462.8 5 1

Unique (cost=5,804.03..5,821.38 rows=2,314 width=16) (actual time=12,252.441..12,253.015 rows=5 loops=1)

8. 228.579 12,252.665 ↑ 1.8 1,272 1

Sort (cost=5,804.03..5,809.81 rows=2,314 width=16) (actual time=12,252.439..12,252.665 rows=1,272 loops=1)

  • Sort Key: (to_timestamp((((tiktok_1.json -> 'createTime'::text))::integer)::double precision)) DESC, (((tiktok_1.json ->> 'id'::text))::bigint)
  • Sort Method: external merge Disk: 7,176kB
9. 11,993.994 12,024.086 ↓ 121.5 281,110 1

Bitmap Heap Scan on tiktok tiktok_1 (cost=54.36..5,674.72 rows=2,314 width=16) (actual time=30.799..12,024.086 rows=281,110 loops=1)

  • Recheck Cond: (((json -> 'author'::text) ->> 'uniqueId'::text) = 'benthamite'::text)
  • Heap Blocks: exact=4,555
10. 30.092 30.092 ↓ 121.5 281,110 1

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

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