| Time |
Node |
| Node (ms) |
Percent |
| 17914.226 |
100.00% |
¶ |
Nested Loop (cost=2157.63..2372.01 rows=1 width=85) (actual time=534.661..17914.226 rows=306 loops=1)
|
| 17909.409 |
99.97% |
¶ |
-> Nested Loop (cost=2157.63..2371.84 rows=1 width=49) (actual time=534.626..17909.409 rows=306 loops=1)
Join Filter: (sp.id = ps.super_payment)
|
| 45.926 |
0.26% |
¶ |
-> Nested Loop (cost=0.0..133.15 rows=1 width=49) (actual time=0.115..45.926 rows=183 loops=1)
|
| 44.306 |
0.25% |
¶ |
-> Nested Loop (cost=0.0..132.78 rows=1 width=13) (actual time=0.106..44.306 rows=183 loops=1)
Join Filter: (sp.company = co.id)
|
| 30.608 |
0.17% |
¶ |
-> Nested Loop (cost=0.0..129.68 rows=1 width=13) (actual time=0.028..30.608 rows=183 loops=1)
Join Filter: (sp.fund = sf.id)
|
| 0.523 |
0.00% |
¶ |
-> Index Scan using super_payment_process_idx on super_payment sp (cost=0.0..127.43 rows=1 width=13) (actual time=0.016..0.523 rows=183 loops=1)
Index Cond: (process = 41060)
Filter: (NOT paid)
|
| 13.725 |
0.08% |
¶ |
-> Seq Scan on super_fund sf (cost=0.0..2.06 rows=336 width=8) (actual time=0.004..0.075 rows=336 loops=183)
|
| 6.954 |
0.04% |
¶ |
-> Seq Scan on company co (cost=0.0..3.02 rows=131 width=8) (actual time=0.003..0.038 rows=132 loops=183)
|
| 1.281 |
0.01% |
¶ |
-> Index Scan using organisation_pkey on organisation o (cost=0.0..0.37 rows=1 width=44) (actual time=0.005..0.007 rows=1 loops=183)
Index Cond: (o.id = co.organisation)
|
| 14383.983 |
80.29% |
¶ |
-> Unique (cost=2157.63..2217.26 rows=28629 width=26) (actual time=2.406..78.601 rows=79144 loops=183)
|
| 5353.482 |
29.88% |
¶ |
-> Sort (cost=2157.63..2169.55 rows=28629 width=26) (actual time=2.405..29.254 rows=79689 loops=183)
Sort Key: ps.super_payment, ps.employment, (('Payslip processed '::text || to_char(pr.done, 'DD/MM/YYYY'::text))), ((COALESCE(ps.super, 0::numeric))::aud)
Sort Method: external sort Disk: 5128kB
|
| 238.484 |
1.33% |
¶ |
-> Append (cost=11.04..1804.47 rows=28629 width=26) (actual time=1.045..238.484 rows=79689 loops=1)
|
| 209.889 |
1.17% |
¶ |
-> Hash Join (cost=11.04..1794.26 rows=28539 width=24) (actual time=1.045..209.889 rows=79552 loops=1)
Hash Cond: (ps.process = pr.id)
|
| 53.168 |
0.30% |
¶ |
-> Seq Scan on payslip ps (cost=0.0..1724.98 rows=28539 width=20) (actual time=0.010..53.168 rows=79552 loops=1)
Filter: ((COALESCE(super, 0::numeric) > 0::numeric) AND (status = 3))
|
| 1.011 |
0.01% |
¶ |
-> Hash (cost=10.23..10.23 rows=1392 width=12) (actual time=1.011..1.011 rows=1392 loops=1)
|
| 0.416 |
0.00% |
¶ |
-> Seq Scan on processing_schedule pr (cost=0.0..10.23 rows=1392 width=12) (actual time=0.008..0.416 rows=1392 loops=1)
|
| 0.361 |
0.00% |
¶ |
-> Seq Scan on ytd_base yb (cost=0.0..5.46 rows=90 width=26) (actual time=0.032..0.361 rows=137 loops=1)
Filter: ((COALESCE(super, 0::numeric) - COALESCE(super_paid, 0::numeric)) > 0::numeric)
|
| 3.672 |
0.02% |
¶ |
-> Index Scan using organisation_pkey on organisation fo (cost=0.0..0.17 rows=1 width=44) (actual time=0.011..0.012 rows=1 loops=306)
Index Cond: (fo.id = sf.org)
|
ANALYZEto update the server's statistics.EXPLAINand interpreting its output, see the Postgres documentation, in particular theEXPLAINandANALYZEreferences pages, and Using Explain.