explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VIh0

Settings
# exclusive inclusive rows x rows loops node
1. 149.172 149.172 ↑ 1.2 75,311 3

Filter: ((upper((cards_order.uid)::text) ~~ 'A'::text) OR (upper((customers_customer.email)::text) ~~ 'A'::text) OR (upper((t3.email)::text) ~~ 'A'::text) OR (upper((billing_invoice.number)::text) ~~ 'A'::text) OR (upper((cards_order.client_reference)::text) ~~ 'A'::text))Rows Removed by Filter: 1054153-> Parallel Hash Left Join (cost=220260.32..973449.31 rows=1318814 width=91) (actual time=2645.425..4157.412 rows=1054153 loops=3)Hash Cond: (cards_order.created_by_id = customers_customer.id)-> Parallel Hash Left Join (cost=208797.01..958524.04 rows=1318814 width=72) (actual time=2559.029..3246.470 rows=1054153 loops=3)Hash Cond: (cards_order.invoice_id = billing_invoice.id)-> Parallel Seq Scan on cards_order (cost=0.00..708969.14 rows=1318814 width=67) (actual time=0.006..929.881 rows=1054153 loops=3)-> Parallel Hash (cost=186064.34..186064.34 rows=1307734 width=13) (actual time=1028.627..1028.628 rows=1050446 loops=3)Buckets: 1048576 Batches: 8 Memory Usage: 26720kB-> Parallel Seq Scan on billing_invoice (cost=0.00..186064.34 rows=1307734 width=13) (actual time=0.008..539.520 rows=1050446 loops=3)-> Parallel Hash (cost=10288.14..10288.14 rows=94014 width=27) (actual time=85.849..85.849 rows=75311 loops=3)Buckets: 262144 Batches: 1 Memory Usage: 16096kB-> Parallel Seq Scan on customers_customer (cost=0.00..10288.14 rows=94014 width=27) (actual time=0.007..42.515 rows=75311 loops=3)-> Parallel Hash (cost=10288.14..10288.14 rows=94014 width=27) (actual time=97.231..97.231 rows=75311 loops=3)Buckets: 262144 Batches: 1 Memory Usage: 16096kB-> Parallel Seq Scan on customers_customer t3 (cost=0.00..10,288.14 rows=94,014 width=27) (actual time=0.009..49.724 rows=75,311 loops=3)

Planning time : 0.703 ms
Execution time : 7,410.469 ms