explain.depesz.com

PostgreSQL's explain analyze made readable

Result: g5RG

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 1,855.531 ↑ 1.0 1 1

Limit (cost=40,915.64..40,915.64 rows=1 width=38) (actual time=1,855.519..1,855.531 rows=1 loops=1)

2. 25.176 1,855.518 ↑ 30,000.0 1 1

Sort (cost=40,915.64..40,930.64 rows=30,000 width=38) (actual time=1,855.518..1,855.518 rows=1 loops=1)

  • Sort Key: t4._period DESC, t4._recordertref DESC, t4._recorderrref DESC, t4._lineno DESC, t4._fld1490 DESC
  • Sort Method: top-N heapsort Memory: 25kB
3. 27.309 1,830.342 ↑ 1.0 30,000 1

Limit (cost=40,144.53..40,159.53 rows=30,000 width=38) (actual time=1,788.970..1,830.342 rows=30,000 loops=1)

4. 248.554 1,803.033 ↑ 4.0 30,000 1

Sort (cost=40,144.53..40,204.53 rows=120,000 width=38) (actual time=1,788.967..1,803.033 rows=30,000 loops=1)

  • Sort Key: t4._period, t4._recordertref, t4._recorderrref, t4._lineno, t4._fld1490
  • Sort Method: top-N heapsort Memory: 5052kB
5. 108.229 1,554.479 ↑ 1.0 120,000 1

Append (cost=0.11..21,893.66 rows=120,000 width=38) (actual time=313.508..1,554.479 rows=120,000 loops=1)

6. 27.412 364.521 ↑ 1.0 30,000 1

Limit (cost=0.11..5,173.42 rows=30,000 width=38) (actual time=313.507..364.521 rows=30,000 loops=1)

7. 337.109 337.109 ↑ 28.9 30,000 1

Index Only Scan using _accumrg35762_1 on _accumrg35762 t4 (cost=0.11..149,541.57 rows=867,191 width=38) (actual time=313.505..337.109 rows=30,000 loops=1)

  • Index Cond: (_fld1490 = '0'::numeric)
  • Filter: ((_period > '2015-10-23 00:00:00'::timestamp without time zone) OR ((_period = '2015-10-23 00:00:00'::timestamp without time zone) AND ((_recordertref > '\\000\\000\\002\\330'::bytea) OR ((_recordertref = '\\000\\000\\002\\330'::bytea) AND (_recorderrref > '\\201\\327B\\362\\351*\\016\\011\\021\\345x\\243~\\314g\\240'::bytea)) OR ((_recordertref = '\\000\\000\\002\\330'::bytea) AND (_recorderrref = '\\201\\327B\\362\\351*\\016\\011\\021\\345x\\243~\\314g\\240'::bytea) AND ((_lineno > '1'::numeric) OR ((_lineno = '1'::numeric) AND (_fld1490 > '0'::numeric)))))))
  • Rows Removed by Filter: 1275000
  • Heap Fetches: 1305000
8. 27.516 361.883 ↑ 1.0 30,000 1

Limit (cost=0.11..5,173.42 rows=30,000 width=38) (actual time=310.696..361.883 rows=30,000 loops=1)

9. 334.367 334.367 ↑ 28.9 30,000 1

Index Only Scan using _accumrg35762_1 on _accumrg35762 t6 (cost=0.11..149,541.57 rows=867,191 width=38) (actual time=310.693..334.367 rows=30,000 loops=1)

  • Index Cond: (_fld1490 = '0'::numeric)
  • Filter: ((_period > '2015-10-23 00:00:00'::timestamp without time zone) OR ((_period = '2015-10-23 00:00:00'::timestamp without time zone) AND ((_recordertref > '\\000\\000\\002\\330'::bytea) OR ((_recordertref = '\\000\\000\\002\\330'::bytea) AND (_recorderrref > '\\201\\327B\\362\\351*\\016\\011\\021\\345x\\243~\\314g\\240'::bytea)) OR ((_recordertref = '\\000\\000\\002\\330'::bytea) AND (_recorderrref = '\\201\\327B\\362\\351*\\016\\011\\021\\345x\\243~\\314g\\240'::bytea) AND ((_lineno > '1'::numeric) OR ((_lineno = '1'::numeric) AND (_fld1490 > '0'::numeric)))))))
  • Rows Removed by Filter: 1275000
  • Heap Fetches: 1305000
10. 27.682 358.940 ↑ 1.0 30,000 1

Limit (cost=0.11..5,173.42 rows=30,000 width=38) (actual time=307.856..358.940 rows=30,000 loops=1)

11. 331.258 331.258 ↑ 28.9 30,000 1

Index Only Scan using _accumrg35762_1 on _accumrg35762 t8 (cost=0.11..149,541.57 rows=867,191 width=38) (actual time=307.854..331.258 rows=30,000 loops=1)

  • Index Cond: (_fld1490 = '0'::numeric)
  • Filter: ((_period > '2015-10-23 00:00:00'::timestamp without time zone) OR ((_period = '2015-10-23 00:00:00'::timestamp without time zone) AND ((_recordertref > '\\000\\000\\002\\330'::bytea) OR ((_recordertref = '\\000\\000\\002\\330'::bytea) AND (_recorderrref > '\\201\\327B\\362\\351*\\016\\011\\021\\345x\\243~\\314g\\240'::bytea)) OR ((_recordertref = '\\000\\000\\002\\330'::bytea) AND (_recorderrref = '\\201\\327B\\362\\351*\\016\\011\\021\\345x\\243~\\314g\\240'::bytea) AND ((_lineno > '1'::numeric) OR ((_lineno = '1'::numeric) AND (_fld1490 > '0'::numeric)))))))
  • Rows Removed by Filter: 1275000
  • Heap Fetches: 1305000
12. 27.609 360.906 ↑ 1.0 30,000 1

Limit (cost=0.11..5,173.42 rows=30,000 width=38) (actual time=310.116..360.906 rows=30,000 loops=1)

13. 333.297 333.297 ↑ 28.9 30,000 1

Index Only Scan using _accumrg35762_1 on _accumrg35762 t10 (cost=0.11..149,541.57 rows=867,191 width=38) (actual time=310.112..333.297 rows=30,000 loops=1)

  • Index Cond: (_fld1490 = '0'::numeric)
  • Filter: ((_period > '2015-10-23 00:00:00'::timestamp without time zone) OR ((_period = '2015-10-23 00:00:00'::timestamp without time zone) AND ((_recordertref > '\\000\\000\\002\\330'::bytea) OR ((_recordertref = '\\000\\000\\002\\330'::bytea) AND (_recorderrref > '\\201\\327B\\362\\351*\\016\\011\\021\\345x\\243~\\314g\\240'::bytea)) OR ((_recordertref = '\\000\\000\\002\\330'::bytea) AND (_recorderrref = '\\201\\327B\\362\\351*\\016\\011\\021\\345x\\243~\\314g\\240'::bytea) AND ((_lineno > '1'::numeric) OR ((_lineno = '1'::numeric) AND (_fld1490 > '0'::numeric)))))))
  • Rows Removed by Filter: 1275000
  • Heap Fetches: 1305000