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. 35,141.304 639,260.444 ↑ 6.2 629,144 1

Merge Join (cost=3,104,124.88..3,465,042.65 rows=3,911,524 width=16) (actual time=564,984.807..639,260.444 rows=629,144 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. 292,996.861 315,330.133 ↓ 1.0 9,689,501 1

Sort (cost=1,552,062.44..1,576,284.92 rows=9,688,992 width=29) (actual time=297,294.711..315,330.133 rows=9,689,501 loops=1)

  • Sort Key: r1.vserver, r1.scope, r1.stationid
  • Sort Method: external merge Disk: 409360kB
3. 4,059.965 22,333.272 ↓ 1.0 9,689,501 1

Append (cost=0.00..195,936.92 rows=9,688,992 width=29) (actual time=0.019..22,333.272 rows=9,689,501 loops=1)

4. 0.000 0.000 ↓ 0.0 0 1

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

5. 3,038.471 3,038.471 ↑ 1.0 841,840 1

Seq Scan on r_station_1 r1 (cost=0.00..17,013.09 rows=842,909 width=29) (actual time=0.017..3,038.471 rows=841,840 loops=1)

6. 3,238.129 3,238.129 ↓ 1.0 782,617 1

Seq Scan on r_station_2 r1 (cost=0.00..15,868.02 rows=782,602 width=29) (actual time=10.174..3,238.129 rows=782,617 loops=1)

7. 3,271.917 3,271.917 ↓ 1.0 819,988 1

Seq Scan on r_station_3 r1 (cost=0.00..16,599.41 rows=819,941 width=29) (actual time=15.598..3,271.917 rows=819,988 loops=1)

8. 1,606.255 1,606.255 ↑ 1.0 792,708 1

Seq Scan on r_station_4 r1 (cost=0.00..16,052.56 rows=793,256 width=29) (actual time=23.392..1,606.255 rows=792,708 loops=1)

9. 834.482 834.482 ↓ 1.0 846,711 1

Seq Scan on r_station_5 r1 (cost=0.00..17,145.48 rows=846,248 width=29) (actual time=12.094..834.482 rows=846,711 loops=1)

10. 687.611 687.611 ↑ 1.0 846,678 1

Seq Scan on r_station_6 r1 (cost=0.00..17,140.41 rows=846,841 width=29) (actual time=98.083..687.611 rows=846,678 loops=1)

11. 1,461.774 1,461.774 ↓ 1.0 747,330 1

Seq Scan on r_station_7 r1 (cost=0.00..15,124.77 rows=746,777 width=29) (actual time=15.359..1,461.774 rows=747,330 loops=1)

12. 724.961 724.961 ↓ 1.0 873,631 1

Seq Scan on r_station_8 r1 (cost=0.00..17,641.07 rows=873,207 width=29) (actual time=150.598..724.961 rows=873,631 loops=1)

13. 830.665 830.665 ↓ 1.0 815,552 1

Seq Scan on r_station_9 r1 (cost=0.00..16,469.60 rows=814,760 width=29) (actual time=264.592..830.665 rows=815,552 loops=1)

14. 606.411 606.411 ↓ 1.0 811,286 1

Seq Scan on r_station_10 r1 (cost=0.00..16,379.31 rows=810,831 width=29) (actual time=13.097..606.411 rows=811,286 loops=1)

15. 856.076 856.076 ↓ 1.0 791,196 1

Seq Scan on r_station_11 r1 (cost=0.00..15,970.28 rows=790,428 width=29) (actual time=150.589..856.076 rows=791,196 loops=1)

16. 1,116.555 1,116.555 ↑ 1.0 719,964 1

Seq Scan on r_station_12 r1 (cost=0.00..14,512.92 rows=720,192 width=29) (actual time=21.939..1,116.555 rows=719,964 loops=1)

17. 5,890.767 288,789.007 ↓ 1.1 10,947,789 1

Materialize (cost=1,552,062.44..1,673,174.84 rows=9,688,992 width=29) (actual time=267,688.315..288,789.007 rows=10,947,789 loops=1)

18. 273,796.852 282,898.240 ↓ 1.0 9,689,501 1

Sort (cost=1,552,062.44..1,576,284.92 rows=9,688,992 width=29) (actual time=267,688.309..282,898.240 rows=9,689,501 loops=1)

  • Sort Key: r2.vserver, r2.scope, r2.stationid
  • Sort Method: external merge Disk: 409360kB
19. 4,127.947 9,101.388 ↓ 1.0 9,689,501 1

Append (cost=0.00..195,936.92 rows=9,688,992 width=29) (actual time=0.015..9,101.388 rows=9,689,501 loops=1)

20. 0.001 0.001 ↓ 0.0 0 1

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

21. 322.417 322.417 ↑ 1.0 841,840 1

Seq Scan on r_station_1 r2 (cost=0.00..17,013.09 rows=842,909 width=29) (actual time=0.012..322.417 rows=841,840 loops=1)

22. 306.589 306.589 ↓ 1.0 782,617 1

Seq Scan on r_station_2 r2 (cost=0.00..15,868.02 rows=782,602 width=29) (actual time=0.005..306.589 rows=782,617 loops=1)

23. 346.557 346.557 ↓ 1.0 819,988 1

Seq Scan on r_station_3 r2 (cost=0.00..16,599.41 rows=819,941 width=29) (actual time=0.005..346.557 rows=819,988 loops=1)

24. 419.008 419.008 ↑ 1.0 792,708 1

Seq Scan on r_station_4 r2 (cost=0.00..16,052.56 rows=793,256 width=29) (actual time=0.006..419.008 rows=792,708 loops=1)

25. 419.625 419.625 ↓ 1.0 846,711 1

Seq Scan on r_station_5 r2 (cost=0.00..17,145.48 rows=846,248 width=29) (actual time=0.006..419.625 rows=846,711 loops=1)

26. 467.240 467.240 ↑ 1.0 846,678 1

Seq Scan on r_station_6 r2 (cost=0.00..17,140.41 rows=846,841 width=29) (actual time=0.006..467.240 rows=846,678 loops=1)

27. 439.226 439.226 ↓ 1.0 747,330 1

Seq Scan on r_station_7 r2 (cost=0.00..15,124.77 rows=746,777 width=29) (actual time=0.006..439.226 rows=747,330 loops=1)

28. 511.140 511.140 ↓ 1.0 873,631 1

Seq Scan on r_station_8 r2 (cost=0.00..17,641.07 rows=873,207 width=29) (actual time=0.006..511.140 rows=873,631 loops=1)

29. 477.576 477.576 ↓ 1.0 815,552 1

Seq Scan on r_station_9 r2 (cost=0.00..16,469.60 rows=814,760 width=29) (actual time=0.006..477.576 rows=815,552 loops=1)

30. 472.828 472.828 ↓ 1.0 811,286 1

Seq Scan on r_station_10 r2 (cost=0.00..16,379.31 rows=810,831 width=29) (actual time=0.005..472.828 rows=811,286 loops=1)

31. 483.329 483.329 ↓ 1.0 791,196 1

Seq Scan on r_station_11 r2 (cost=0.00..15,970.28 rows=790,428 width=29) (actual time=0.007..483.329 rows=791,196 loops=1)

32. 307.905 307.905 ↑ 1.0 719,964 1

Seq Scan on r_station_12 r2 (cost=0.00..14,512.92 rows=720,192 width=29) (actual time=0.005..307.905 rows=719,964 loops=1)