explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8z7X

Settings
# exclusive inclusive rows x rows loops node
1. 1.080 23,275.022 ↑ 578.5 4 1

Hash Left Join (cost=132,931.99..138,675.17 rows=2,314 width=108) (actual time=23,274.287..23,275.022 rows=4 loops=1)

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

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

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

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

  • Index Cond: (((json -> 'author'::text) ->> 'uniqueId'::text) = 'lilweehag'::text)
4. 7.474 23,273.792 ↓ 173.7 34,747 1

Hash (cost=132,875.14..132,875.14 rows=200 width=11) (actual time=23,273.792..23,273.792 rows=34,747 loops=1)

  • Buckets: 65,536 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2,141kB
5. 3.819 23,266.318 ↓ 173.7 34,747 1

Subquery Scan on te (cost=132,820.47..132,875.14 rows=200 width=11) (actual time=23,236.439..23,266.318 rows=34,747 loops=1)

6. 0.000 23,262.499 ↓ 173.7 34,747 1

Finalize GroupAggregate (cost=132,820.47..132,873.14 rows=200 width=11) (actual time=23,236.438..23,262.499 rows=34,747 loops=1)

  • Group Key: (((tiktok_1.json ->> 'id'::text))::bigint)
7. 92.187 23,266.436 ↓ 95.4 38,149 1

Gather Merge (cost=132,820.47..132,867.14 rows=400 width=11) (actual time=23,236.429..23,266.436 rows=38,149 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 5.033 23,174.249 ↓ 63.6 12,716 3 / 3

Sort (cost=131,820.44..131,820.94 rows=200 width=11) (actual time=23,172.745..23,174.249 rows=12,716 loops=3)

  • Sort Key: (((tiktok_1.json ->> 'id'::text))::bigint)
  • Sort Method: quicksort Memory: 1,009kB
  • Worker 0: Sort Method: quicksort Memory: 973kB
  • Worker 1: Sort Method: quicksort Memory: 960kB
9. 1,440.798 23,169.216 ↓ 63.6 12,716 3 / 3

Partial HashAggregate (cost=131,810.80..131,812.80 rows=200 width=11) (actual time=23,166.892..23,169.216 rows=12,716 loops=3)

  • Group Key: ((tiktok_1.json ->> 'id'::text))::bigint
10. 21,627.699 21,728.418 ↑ 24.9 774,730 3 / 3

ProjectSet (cost=0.00..112,143.08 rows=19,282,100 width=40) (actual time=2.282..21,728.418 rows=774,730 loops=3)

11. 100.719 100.719 ↑ 1.2 154,273 3 / 3

Parallel Seq Scan on tiktok tiktok_1 (cost=0.00..12,358.21 rows=192,821 width=118) (actual time=0.846..100.719 rows=154,273 loops=3)