explain.depesz.com

A tool for finding a real cause for slow queries.

Result: Bjs : test

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 35141.304 639260.444 ↑ 6.2 629144 1

Merge Join (cost=3104124.88..3465042.65 rows=3911524 width=16) (actual time=564984.807..639260.444 rows=629144 loops=1)

  • Merge Cond: (((r1.vserver)::text = (r2.vserver)::text) AND (r1.scope = r2.scope) AND (r1.stationid = r2.stationid))
  • Join Filter: (r1.id < r2.id)
2. 292996.861 315330.133 ↓ 1.0 9689501 1

Sort (cost=1552062.44..1576284.92 rows=9688992 width=29) (actual time=297294.711..315330.133 rows=9689501 loops=1)

  • Sort Key: r1.vserver, r1.scope, r1.stationid
  • Sort Method: external merge Disk: 409360kB
3. 4059.965 22333.272 ↓ 1.0 9689501 1

Append (cost=0.00..195936.92 rows=9688992 width=29) (actual time=0.019..22333.272 rows=9689501 loops=1)

4. 0.000 0.000 ↓ 0.0 0 1

Seq Scan on r_station r1 (cost=0.00..20.00 rows=1000 width=29) (actual time=0.000..0.000 rows=0 loops=1)

5. 3038.471 3038.471 ↑ 1.0 841840 1

Seq Scan on r_station_1 r1 (cost=0.00..17013.09 rows=842909 width=29) (actual time=0.017..3038.471 rows=841840 loops=1)

6. 3238.129 3238.129 ↓ 1.0 782617 1

Seq Scan on r_station_2 r1 (cost=0.00..15868.02 rows=782602 width=29) (actual time=10.174..3238.129 rows=782617 loops=1)

7. 3271.917 3271.917 ↓ 1.0 819988 1

Seq Scan on r_station_3 r1 (cost=0.00..16599.41 rows=819941 width=29) (actual time=15.598..3271.917 rows=819988 loops=1)

8. 1606.255 1606.255 ↑ 1.0 792708 1

Seq Scan on r_station_4 r1 (cost=0.00..16052.56 rows=793256 width=29) (actual time=23.392..1606.255 rows=792708 loops=1)

9. 834.482 834.482 ↓ 1.0 846711 1

Seq Scan on r_station_5 r1 (cost=0.00..17145.48 rows=846248 width=29) (actual time=12.094..834.482 rows=846711 loops=1)

10. 687.611 687.611 ↑ 1.0 846678 1

Seq Scan on r_station_6 r1 (cost=0.00..17140.41 rows=846841 width=29) (actual time=98.083..687.611 rows=846678 loops=1)

11. 1461.774 1461.774 ↓ 1.0 747330 1

Seq Scan on r_station_7 r1 (cost=0.00..15124.77 rows=746777 width=29) (actual time=15.359..1461.774 rows=747330 loops=1)

12. 724.961 724.961 ↓ 1.0 873631 1

Seq Scan on r_station_8 r1 (cost=0.00..17641.07 rows=873207 width=29) (actual time=150.598..724.961 rows=873631 loops=1)

13. 830.665 830.665 ↓ 1.0 815552 1

Seq Scan on r_station_9 r1 (cost=0.00..16469.60 rows=814760 width=29) (actual time=264.592..830.665 rows=815552 loops=1)

14. 606.411 606.411 ↓ 1.0 811286 1

Seq Scan on r_station_10 r1 (cost=0.00..16379.31 rows=810831 width=29) (actual time=13.097..606.411 rows=811286 loops=1)

15. 856.076 856.076 ↓ 1.0 791196 1

Seq Scan on r_station_11 r1 (cost=0.00..15970.28 rows=790428 width=29) (actual time=150.589..856.076 rows=791196 loops=1)

16. 1116.555 1116.555 ↑ 1.0 719964 1

Seq Scan on r_station_12 r1 (cost=0.00..14512.92 rows=720192 width=29) (actual time=21.939..1116.555 rows=719964 loops=1)

17. 5890.767 288789.007 ↓ 1.1 10947789 1

Materialize (cost=1552062.44..1673174.84 rows=9688992 width=29) (actual time=267688.315..288789.007 rows=10947789 loops=1)

18. 273796.852 282898.240 ↓ 1.0 9689501 1

Sort (cost=1552062.44..1576284.92 rows=9688992 width=29) (actual time=267688.309..282898.240 rows=9689501 loops=1)

  • Sort Key: r2.vserver, r2.scope, r2.stationid
  • Sort Method: external merge Disk: 409360kB
19. 4127.947 9101.388 ↓ 1.0 9689501 1

Append (cost=0.00..195936.92 rows=9688992 width=29) (actual time=0.015..9101.388 rows=9689501 loops=1)

20. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on r_station r2 (cost=0.00..20.00 rows=1000 width=29) (actual time=0.001..0.001 rows=0 loops=1)

21. 322.417 322.417 ↑ 1.0 841840 1

Seq Scan on r_station_1 r2 (cost=0.00..17013.09 rows=842909 width=29) (actual time=0.012..322.417 rows=841840 loops=1)

22. 306.589 306.589 ↓ 1.0 782617 1

Seq Scan on r_station_2 r2 (cost=0.00..15868.02 rows=782602 width=29) (actual time=0.005..306.589 rows=782617 loops=1)

23. 346.557 346.557 ↓ 1.0 819988 1

Seq Scan on r_station_3 r2 (cost=0.00..16599.41 rows=819941 width=29) (actual time=0.005..346.557 rows=819988 loops=1)

24. 419.008 419.008 ↑ 1.0 792708 1

Seq Scan on r_station_4 r2 (cost=0.00..16052.56 rows=793256 width=29) (actual time=0.006..419.008 rows=792708 loops=1)

25. 419.625 419.625 ↓ 1.0 846711 1

Seq Scan on r_station_5 r2 (cost=0.00..17145.48 rows=846248 width=29) (actual time=0.006..419.625 rows=846711 loops=1)

26. 467.240 467.240 ↑ 1.0 846678 1

Seq Scan on r_station_6 r2 (cost=0.00..17140.41 rows=846841 width=29) (actual time=0.006..467.240 rows=846678 loops=1)

27. 439.226 439.226 ↓ 1.0 747330 1

Seq Scan on r_station_7 r2 (cost=0.00..15124.77 rows=746777 width=29) (actual time=0.006..439.226 rows=747330 loops=1)

28. 511.140 511.140 ↓ 1.0 873631 1

Seq Scan on r_station_8 r2 (cost=0.00..17641.07 rows=873207 width=29) (actual time=0.006..511.140 rows=873631 loops=1)

29. 477.576 477.576 ↓ 1.0 815552 1

Seq Scan on r_station_9 r2 (cost=0.00..16469.60 rows=814760 width=29) (actual time=0.006..477.576 rows=815552 loops=1)

30. 472.828 472.828 ↓ 1.0 811286 1

Seq Scan on r_station_10 r2 (cost=0.00..16379.31 rows=810831 width=29) (actual time=0.005..472.828 rows=811286 loops=1)

31. 483.329 483.329 ↓ 1.0 791196 1

Seq Scan on r_station_11 r2 (cost=0.00..15970.28 rows=790428 width=29) (actual time=0.007..483.329 rows=791196 loops=1)

32. 307.905 307.905 ↑ 1.0 719964 1

Seq Scan on r_station_12 r2 (cost=0.00..14512.92 rows=720192 width=29) (actual time=0.005..307.905 rows=719964 loops=1)