explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ih8Y

Settings
# exclusive inclusive rows x rows loops node
1. 18.297 409.815 ↓ 3.8 77,992 1

Hash Left Join (cost=6,026.59..11,874.15 rows=20,788 width=134) (actual time=162.446..409.815 rows=77,992 loops=1)

  • Hash Cond: (sbd.office = o2.officeid)
2. 33.854 391.464 ↓ 3.8 77,992 1

Hash Left Join (cost=6,019.64..11,789.24 rows=20,788 width=146) (actual time=162.386..391.464 rows=77,992 loops=1)

  • Hash Cond: (cs.officeid = o1.officeid)
3. 44.274 357.553 ↓ 3.8 77,992 1

Hash Left Join (cost=6,012.69..11,500.63 rows=20,788 width=145) (actual time=162.314..357.553 rows=77,992 loops=1)

  • Hash Cond: (cs.supplierid = s.supplierid)
4. 44.390 298.107 ↓ 3.8 77,992 1

Hash Left Join (cost=4,877.23..9,923.42 rows=20,788 width=124) (actual time=147.112..298.107 rows=77,992 loops=1)

  • Hash Cond: (q.clientsupplier = cs.clientsupplierid)
5. 90.364 211.719 ↓ 3.8 77,992 1

Hash Right Join (cost=2,942.00..7,598.41 rows=20,788 width=118) (actual time=104.964..211.719 rows=77,992 loops=1)

  • Hash Cond: (q.productid = pd.productid)
6. 16.620 16.620 ↑ 1.0 101,879 1

Seq Scan on quotation q (cost=0.00..3,811.79 rows=101,879 width=17) (actual time=0.005..16.620 rows=101,879 loops=1)

7. 10.996 104.735 ↓ 2.2 12,037 1

Hash (cost=2,873.46..2,873.46 rows=5,483 width=109) (actual time=104.735..104.735 rows=12,037 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 1,358kB
8. 14.083 93.739 ↓ 2.2 12,037 1

Hash Left Join (cost=1,148.35..2,873.46 rows=5,483 width=109) (actual time=22.224..93.739 rows=12,037 loops=1)

  • Hash Cond: ((pd.client = d.clientid) AND (pd.department = d.departmentid))
9. 3.121 79.442 ↓ 2.2 12,037 1

Nested Loop (cost=1,030.04..2,713.12 rows=5,483 width=102) (actual time=21.966..79.442 rows=12,037 loops=1)

10. 0.045 0.045 ↑ 1.0 1 1

Seq Scan on dbclient c (cost=0.00..3.37 rows=1 width=12) (actual time=0.041..0.045 rows=1 loops=1)

  • Filter: ((clientid = 8,731,597::numeric) AND ((companyshort)::text = 'WIW'::text))
  • Rows Removed by Filter: 90
11. 13.856 76.276 ↓ 2.2 12,037 1

Hash Left Join (cost=1,030.04..2,654.93 rows=5,483 width=90) (actual time=21.919..76.276 rows=12,037 loops=1)

  • Hash Cond: ((pd.client = sc.clientid) AND (pd.seasonclient = sc.seasonclientid))
12. 14.055 62.329 ↓ 2.2 12,037 1

Hash Join (cost=1,018.89..2,600.33 rows=5,483 width=85) (actual time=21.740..62.329 rows=12,037 loops=1)

  • Hash Cond: (sbd.productid = pd.productid)
13. 26.557 26.557 ↑ 1.0 12,037 1

Seq Scan on sourcerbriefingdetails sbd (cost=0.00..1,406.24 rows=12,037 width=28) (actual time=0.009..26.557 rows=12,037 loops=1)

  • Filter: (status = ANY ('{5464132949,5484487929,5464132908,5464132906,5464132907,5537382680}'::numeric[]))
  • Rows Removed by Filter: 14,834
14. 7.857 21.717 ↑ 1.0 12,240 1

Hash (cost=865.89..865.89 rows=12,240 width=65) (actual time=21.717..21.717 rows=12,240 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 1,153kB
15. 13.860 13.860 ↑ 1.0 12,240 1

Seq Scan on product pd (cost=0.00..865.89 rows=12,240 width=65) (actual time=0.029..13.860 rows=12,240 loops=1)

  • Filter: (client = 8,731,597::numeric)
  • Rows Removed by Filter: 14,631
16. 0.020 0.091 ↑ 1.0 25 1

Hash (cost=10.78..10.78 rows=25 width=22) (actual time=0.091..0.091 rows=25 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 2kB
17. 0.019 0.071 ↑ 1.0 25 1

Bitmap Heap Scan on dbseasonclient sc (cost=4.47..10.78 rows=25 width=22) (actual time=0.062..0.071 rows=25 loops=1)

  • Recheck Cond: (clientid = 8,731,597::numeric)
  • Heap Blocks: exact=3
18. 0.052 0.052 ↑ 1.0 25 1

Bitmap Index Scan on ixfkseasonclient02 (cost=0.00..4.46 rows=25 width=0) (actual time=0.052..0.052 rows=25 loops=1)

  • Index Cond: (clientid = 8,731,597::numeric)
19. 0.104 0.214 ↑ 1.0 166 1

Hash (cost=115.81..115.81 rows=166 width=29) (actual time=0.214..0.214 rows=166 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
20. 0.058 0.110 ↑ 1.0 166 1

Bitmap Heap Scan on dbdepartment d (cost=5.57..115.81 rows=166 width=29) (actual time=0.063..0.110 rows=166 loops=1)

  • Recheck Cond: (clientid = 8,731,597::numeric)
  • Heap Blocks: exact=5
21. 0.052 0.052 ↑ 1.0 166 1

Bitmap Index Scan on uxdepartment (cost=0.00..5.53 rows=166 width=0) (actual time=0.052..0.052 rows=166 loops=1)

  • Index Cond: (clientid = 8,731,597::numeric)
22. 23.382 41.998 ↑ 1.0 44,366 1

Hash (cost=1,380.66..1,380.66 rows=44,366 width=23) (actual time=41.998..41.998 rows=44,366 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 2,445kB
23. 18.616 18.616 ↑ 1.0 44,366 1

Seq Scan on dbclientsupplier cs (cost=0.00..1,380.66 rows=44,366 width=23) (actual time=0.009..18.616 rows=44,366 loops=1)

24. 8.894 15.172 ↑ 1.0 26,865 1

Hash (cost=799.65..799.65 rows=26,865 width=29) (actual time=15.172..15.172 rows=26,865 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 1,627kB
25. 6.278 6.278 ↑ 1.0 26,865 1

Seq Scan on dbsupplier s (cost=0.00..799.65 rows=26,865 width=29) (actual time=0.008..6.278 rows=26,865 loops=1)

26. 0.032 0.057 ↑ 1.0 131 1

Hash (cost=5.31..5.31 rows=131 width=8) (actual time=0.057..0.057 rows=131 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 6kB
27. 0.025 0.025 ↑ 1.0 131 1

Seq Scan on dboffice o1 (cost=0.00..5.31 rows=131 width=8) (actual time=0.004..0.025 rows=131 loops=1)

28. 0.031 0.054 ↑ 1.0 131 1

Hash (cost=5.31..5.31 rows=131 width=8) (actual time=0.054..0.054 rows=131 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 6kB
29. 0.023 0.023 ↑ 1.0 131 1

Seq Scan on dboffice o2 (cost=0.00..5.31 rows=131 width=8) (actual time=0.001..0.023 rows=131 loops=1)

Planning time : 5.480 ms
Execution time : 413.178 ms