explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uE8

Settings
# exclusive inclusive rows x rows loops node
1. 25.250 2,668.326 ↓ 270.9 7,584 1

Hash Right Join (cost=3,154.29..12,487.47 rows=28 width=2,856) (actual time=1,783.001..2,668.326 rows=7,584 loops=1)

  • Hash Cond: (cii.contentitemid = ci.contentitemid)
2. 84.172 1,215.401 ↓ 37.9 7,584 1

GroupAggregate (cost=3,043.10..12,373.25 rows=200 width=40) (actual time=355.313..1,215.401 rows=7,584 loops=1)

  • Group Key: cii.contentitemid
3. 10.050 1,131.229 ↑ 39.5 8,503 1

Merge Left Join (cost=3,043.10..8,176.51 rows=335,539 width=16) (actual time=355.244..1,131.229 rows=8,503 loops=1)

  • Merge Cond: (cii.contentitemid = t2ci.contentitemid)
4. 775.475 775.475 ↓ 3.0 7,584 1

Foreign Scan on contentitem cii (cost=100.00..193.92 rows=2,560 width=8) (actual time=10.641..775.475 rows=7,584 loops=1)

5. 9.647 345.704 ↑ 11.0 2,378 1

Sort (cost=2,943.10..3,008.64 rows=26,214 width=16) (actual time=344.597..345.704 rows=2,378 loops=1)

  • Sort Key: t2ci.contentitemid
  • Sort Method: quicksort Memory: 208kB
6. 140.758 336.057 ↑ 11.0 2,378 1

Merge Left Join (cost=615.80..1,019.25 rows=26,214 width=16) (actual time=118.000..336.057 rows=2,378 loops=1)

  • Merge Cond: (t2ci.termid = cit.termid)
7. 4.715 55.200 ↓ 1.2 2,378 1

Sort (cost=284.08..289.20 rows=2,048 width=16) (actual time=51.908..55.200 rows=2,378 loops=1)

  • Sort Key: t2ci.termid
  • Sort Method: quicksort Memory: 208kB
8. 50.485 50.485 ↓ 1.2 2,378 1

Foreign Scan on term_to_contentitem t2ci (cost=100.00..171.44 rows=2,048 width=16) (actual time=3.908..50.485 rows=2,378 loops=1)

9. 75.343 140.099 ↓ 1.2 2,974 1

Sort (cost=331.72..338.12 rows=2,560 width=8) (actual time=66.074..140.099 rows=2,974 loops=1)

  • Sort Key: cit.termid
  • Sort Method: quicksort Memory: 112kB
10. 64.756 64.756 ↑ 1.9 1,354 1

Foreign Scan on term cit (cost=100.00..186.80 rows=2,560 width=8) (actual time=5.461..64.756 rows=1,354 loops=1)

11. 14.518 1,427.675 ↓ 270.9 7,584 1

Hash (cost=110.84..110.84 rows=28 width=2,824) (actual time=1,427.674..1,427.675 rows=7,584 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 2835kB
12. 1,413.157 1,413.157 ↓ 270.9 7,584 1

Foreign Scan on contentitem ci (cost=100.00..110.84 rows=28 width=2,824) (actual time=16.653..1,413.157 rows=7,584 loops=1)

Planning time : 0.489 ms