explain.depesz.com

PostgreSQL's explain analyze made readable

Result: XNLb

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 1,187.442 ↓ 90.5 181 1

Limit (cost=359,301.27..359,301.31 rows=2 width=67) (actual time=1,187.359..1,187.442 rows=181 loops=1)

2. 0.058 1,187.426 ↓ 90.5 181 1

Unique (cost=359,301.27..359,301.31 rows=2 width=67) (actual time=1,187.358..1,187.426 rows=181 loops=1)

3. 0.444 1,187.368 ↓ 90.5 181 1

Sort (cost=359,301.27..359,301.27 rows=2 width=67) (actual time=1,187.357..1,187.368 rows=181 loops=1)

  • Sort Key: main.customer, main.gateway_state, main.datatimestamp, main.gateway_updatetimets, main.ownercompanyid, main.lastmodifiedtime, main.entryseq
  • Sort Method: quicksort Memory: 50kB
4. 0.093 1,186.924 ↓ 90.5 181 1

Sort (cost=359,301.23..359,301.24 rows=2 width=67) (actual time=1,186.909..1,186.924 rows=181 loops=1)

  • Sort Key: main.lastmodifiedtime DESC
  • Sort Method: quicksort Memory: 50kB
5. 14.066 1,186.831 ↓ 90.5 181 1

Hash Join (cost=354,919.70..359,301.22 rows=2 width=67) (actual time=1,173.737..1,186.831 rows=181 loops=1)

  • Hash Cond: ((max(fis_creditsuisse.entryseq)) = main.entryseq)
6. 87.182 1,172.105 ↓ 1.0 116,785 1

GroupAggregate (cost=354,552.07..357,505.71 rows=113,100 width=47) (actual time=993.220..1,172.105 rows=116,785 loops=1)

  • Group Key: fis_creditsuisse.customer, (date_trunc('minute'::text, fis_creditsuisse.datatimestamp)), fis_creditsuisse.market
7. 911.817 1,084.923 ↓ 1.8 224,917 1

Sort (cost=354,552.07..354,860.05 rows=123,191 width=39) (actual time=993.206..1,084.923 rows=224,917 loops=1)

  • Sort Key: fis_creditsuisse.customer, (date_trunc('minute'::text, fis_creditsuisse.datatimestamp)), fis_creditsuisse.market
  • Sort Method: external merge Disk: 11,488kB
8. 150.207 173.106 ↓ 1.8 224,917 1

Bitmap Heap Scan on fis_creditsuisse (cost=3,855.29..340,765.44 rows=123,191 width=39) (actual time=24.360..173.106 rows=224,917 loops=1)

  • Recheck Cond: (lastmodifiedtime > (now() - '4 days'::interval day))
  • Heap Blocks: exact=11,576
9. 22.899 22.899 ↓ 1.8 224,917 1

Bitmap Index Scan on cs_lastmodified_market (cost=0.00..3,824.49 rows=123,191 width=0) (actual time=22.899..22.899 rows=224,917 loops=1)

  • Index Cond: (lastmodifiedtime > (now() - '4 days'::interval day))
10. 0.122 0.660 ↓ 3.9 348 1

Hash (cost=366.50..366.50 rows=90 width=67) (actual time=0.660..0.660 rows=348 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 44kB
11. 0.538 0.538 ↓ 3.9 348 1

Index Scan using cs_hourlyview_1 on fis_creditsuisse main (cost=0.56..366.50 rows=90 width=67) (actual time=0.048..0.538 rows=348 loops=1)

  • Index Cond: ((market = 'C21_4412'::text) AND (lastmodifiedtime > (now() - '4 days'::interval day)) AND (lastmodifiedtime > '2020-07-30 08:03:31'::timestamp without time zone))