explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9idk

Settings
# exclusive inclusive rows x rows loops node
1. 2.194 27,242.254 ↑ 578.5 4 1

Hash Left Join (cost=132,945.20..138,688.37 rows=2,314 width=108) (actual time=27,241.063..27,242.254 rows=4 loops=1)

  • Hash Cond: (((tiktok.json ->> 'id'::text))::bigint = te.id)
2. 0.257 0.773 ↑ 578.5 4 1

Bitmap Heap Scan on tiktok (cost=54.36..5,634.22 rows=2,314 width=127) (actual time=0.650..0.773 rows=4 loops=1)

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

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

  • Index Cond: (((json -> 'author'::text) ->> 'uniqueId'::text) = 'lilweehag'::text)
4. 9.674 27,239.287 ↓ 173.7 34,747 1

Hash (cost=132,888.34..132,888.34 rows=200 width=11) (actual time=27,239.287..27,239.287 rows=34,747 loops=1)

  • Buckets: 65,536 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2,141kB
5. 4.431 27,229.613 ↓ 173.7 34,747 1

Subquery Scan on te (cost=132,833.67..132,888.34 rows=200 width=11) (actual time=27,192.383..27,229.613 rows=34,747 loops=1)

6. 4.693 27,225.182 ↓ 173.7 34,747 1

Finalize GroupAggregate (cost=132,833.67..132,886.34 rows=200 width=11) (actual time=27,192.380..27,225.182 rows=34,747 loops=1)

  • Group Key: (((tiktok_1.json ->> 'id'::text))::bigint)
7. 119.666 27,220.489 ↓ 95.0 38,018 1

Gather Merge (cost=132,833.67..132,880.34 rows=400 width=11) (actual time=27,192.362..27,220.489 rows=38,018 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 7.269 27,100.823 ↓ 63.4 12,673 3 / 3

Sort (cost=131,833.65..131,834.15 rows=200 width=11) (actual time=27,098.373..27,100.823 rows=12,673 loops=3)

  • Sort Key: (((tiktok_1.json ->> 'id'::text))::bigint)
  • Sort Method: quicksort Memory: 965kB
  • Worker 0: Sort Method: quicksort Memory: 1,009kB
  • Worker 1: Sort Method: quicksort Memory: 961kB
9. 1,741.907 27,093.554 ↓ 63.4 12,673 3 / 3

Partial HashAggregate (cost=131,824.00..131,826.00 rows=200 width=11) (actual time=27,089.164..27,093.554 rows=12,673 loops=3)

  • Group Key: ((tiktok_1.json ->> 'id'::text))::bigint
10. 25,226.054 25,351.647 ↑ 24.9 774,787 3 / 3

ProjectSet (cost=0.00..112,154.15 rows=19,284,200 width=40) (actual time=4.952..25,351.647 rows=774,787 loops=3)

11. 125.593 125.593 ↑ 1.2 154,290 3 / 3

Parallel Seq Scan on tiktok tiktok_1 (cost=0.00..12,358.42 rows=192,842 width=118) (actual time=1.033..125.593 rows=154,290 loops=3)