explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7EpU

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 757.794 ↓ 0.0 0 1

Sort (cost=131,294.11..131,294.11 rows=1 width=78) (actual time=757.794..757.794 rows=0 loops=1)

  • Sort Key: ((r.id)::character varying), rt_2.typename
  • Sort Method: quicksort Memory: 25kB
2. 0.000 757.788 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,000.28..131,294.10 rows=1 width=78) (actual time=757.788..757.788 rows=0 loops=1)

  • Join Filter: (r.type = 1)
3. 0.000 757.788 ↓ 0.0 0 1

Nested Loop (cost=1,000.28..131,289.33 rows=1 width=144) (actual time=757.788..757.788 rows=0 loops=1)

4. 103.506 842.488 ↓ 0.0 0 1

Gather (cost=1,000.00..131,287.41 rows=1 width=148) (actual time=757.787..842.488 rows=0 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
5. 620.243 738.982 ↓ 0.0 0 5

Nested Loop (cost=0.00..130,287.31 rows=1 width=148) (actual time=738.982..738.982 rows=0 loops=5)

6. 7.295 118.733 ↓ 163.6 92,414 5

Parallel Append (cost=0.00..128,030.61 rows=565 width=54) (actual time=32.616..118.733 rows=92,414 loops=5)

7. 69.182 111.414 ↓ 163.6 92,414 5

Parallel Bitmap Heap Scan on receipttransaction_4_2019 rt_2 (cost=9,206.86..127,999.95 rows=565 width=54) (actual time=32.610..111.414 rows=92,414 loops=5)

  • Recheck Cond: ((fk_client = '2637046924'::bigint) AND (rt_time > '2019-03-29 23:36:26.217'::timestamp without time zone) AND (rt_time <= '2019-05-10 00:36:26.858'::timestamp without time zone))
  • Filter: ((NOT ignoreinreporting) AND ((fk_client % '10'::bigint) = '4'::bigint))
  • Heap Blocks: exact=5753
8. 42.232 42.232 ↓ 1.0 462,068 1

Bitmap Index Scan on receipttransaction_4_2019_fk_client_rt_time_idx (cost=0.00..9,206.30 rows=451,701 width=0) (actual time=42.232..42.232 rows=462,068 loops=1)

  • Index Cond: ((fk_client = '2637046924'::bigint) AND (rt_time > '2019-03-29 23:36:26.217'::timestamp without time zone) AND (rt_time <= '2019-05-10 00:36:26.858'::timestamp without time zone))
9. 0.023 0.023 ↓ 0.0 0 1

Parallel Index Scan using receipttransaction_4_fk_client_rt_time_idx on receipttransaction_4 rt_1 (cost=0.14..2.41 rows=1 width=45) (actual time=0.023..0.023 rows=0 loops=1)

  • Index Cond: ((fk_client = '2637046924'::bigint) AND (rt_time > '2019-03-29 23:36:26.217'::timestamp without time zone) AND (rt_time <= '2019-05-10 00:36:26.858'::timestamp without time zone))
  • Filter: ((NOT ignoreinreporting) AND ((fk_client % '10'::bigint) = '4'::bigint))
10. 0.001 0.001 ↓ 0.0 0 1

Parallel Seq Scan on receipttransaction rt (cost=0.00..0.00 rows=1 width=158) (actual time=0.001..0.001 rows=0 loops=1)

  • Filter: ((NOT ignoreinreporting) AND (rt_time > '2019-03-29 23:36:26.217'::timestamp without time zone) AND (rt_time <= '2019-05-10 00:36:26.858'::timestamp without time zone) AND (fk_client = '2637046924'::bigint) AND ((fk_client % '10'::bigint) = '4'::bigint))
11. 0.001 0.006 ↓ 0.0 0 462,068

Append (cost=0.00..3.69 rows=3 width=102) (actual time=0.006..0.006 rows=0 loops=462,068)

12. 0.000 0.000 ↓ 0.0 0 462,068

Seq Scan on receipt r (cost=0.00..0.00 rows=1 width=118) (actual time=0.000..0.000 rows=0 loops=462,068)

  • Filter: ((r_time > '2019-03-29 23:36:26.217'::timestamp without time zone) AND (r_time <= '2019-05-10 00:36:26.858'::timestamp without time zone) AND (salesreadingtime > '2019-05-09 23:36:26.217'::timestamp without time zone) AND (salesreadingtime <= '2019-05-10 00:36:26.858'::timestamp without time zone) AND (fk_client = '2637046924'::bigint) AND (rt_2.fk_receipt = id) AND ((fk_client % '10'::bigint) = '4'::bigint) AND (type <> ALL ('{3,4,5,7,8,11,15,16,18,20,21}'::integer[])))
13. 0.001 0.001 ↓ 0.0 0 462,068

Index Scan using receipt_4_pkey on receipt_4 r_1 (cost=0.14..0.82 rows=1 width=118) (actual time=0.001..0.001 rows=0 loops=462,068)

  • Index Cond: (id = rt_2.fk_receipt)
  • Filter: ((r_time > '2019-03-29 23:36:26.217'::timestamp without time zone) AND (r_time <= '2019-05-10 00:36:26.858'::timestamp without time zone) AND (salesreadingtime > '2019-05-09 23:36:26.217'::timestamp without time zone) AND (salesreadingtime <= '2019-05-10 00:36:26.858'::timestamp without time zone) AND (fk_client = '2637046924'::bigint) AND ((fk_client % '10'::bigint) = '4'::bigint) AND (type <> ALL ('{3,4,5,7,8,11,15,16,18,20,21}'::integer[])))
14. 0.004 0.004 ↓ 0.0 0 462,068

Index Scan using receipt_4_2019_pkey on receipt_4_2019 r_2 (cost=0.43..2.72 rows=1 width=69) (actual time=0.004..0.004 rows=0 loops=462,068)

  • Index Cond: (id = rt_2.fk_receipt)
  • Filter: ((r_time > '2019-03-29 23:36:26.217'::timestamp without time zone) AND (r_time <= '2019-05-10 00:36:26.858'::timestamp without time zone) AND (salesreadingtime > '2019-05-09 23:36:26.217'::timestamp without time zone) AND (salesreadingtime <= '2019-05-10 00:36:26.858'::timestamp without time zone) AND (fk_client = '2637046924'::bigint) AND ((fk_client % '10'::bigint) = '4'::bigint) AND (type <> ALL ('{3,4,5,7,8,11,15,16,18,20,21}'::integer[])))
  • Rows Removed by Filter: 1
15. 0.000 0.000 ↓ 0.0 0

Index Scan using currency_pkey on currency cu (cost=0.28..1.92 rows=1 width=12) (never executed)

  • Index Cond: (id = rt_2.fk_currency)
16. 0.000 0.000 ↓ 0.0 0

Append (cost=0.00..4.41 rows=3 width=41) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Seq Scan on receipt rr (cost=0.00..0.00 rows=1 width=90) (never executed)

  • Filter: ((r_time > '2019-03-29 23:36:26.217'::timestamp without time zone) AND (r_time <= '2019-05-10 00:36:26.858'::timestamp without time zone) AND (fk_client = '2637046924'::bigint) AND ((sourcehash)::text = (r.cancelledreceiptsourcehash)::text) AND ((fk_client % '10'::bigint) = '4'::bigint) AND (type <> ALL ('{3,4,5,7,8,11,15,16,18,20,21}'::integer[])))
18. 0.000 0.000 ↓ 0.0 0

Index Scan using receipt_4_sourcehash_idx on receipt_4 rr_1 (cost=0.14..1.37 rows=1 width=41) (never executed)

  • Index Cond: ((sourcehash)::text = (r.cancelledreceiptsourcehash)::text)
  • Filter: ((r_time > '2019-03-29 23:36:26.217'::timestamp without time zone) AND (r_time <= '2019-05-10 00:36:26.858'::timestamp without time zone) AND (fk_client = '2637046924'::bigint) AND ((fk_client % '10'::bigint) = '4'::bigint) AND (type <> ALL ('{3,4,5,7,8,11,15,16,18,20,21}'::integer[])))
19. 0.000 0.000 ↓ 0.0 0

Index Scan using receipt_4_2019_sourcehash_idx on receipt_4_2019 rr_2 (cost=0.56..2.89 rows=1 width=41) (never executed)

  • Index Cond: ((sourcehash)::text = (r.cancelledreceiptsourcehash)::text)
  • Filter: ((r_time > '2019-03-29 23:36:26.217'::timestamp without time zone) AND (r_time <= '2019-05-10 00:36:26.858'::timestamp without time zone) AND (fk_client = '2637046924'::bigint) AND ((fk_client % '10'::bigint) = '4'::bigint) AND (type <> ALL ('{3,4,5,7,8,11,15,16,18,20,21}'::integer[])))
Planning time : 71.114 ms
Execution time : 842.668 ms