explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PfAu : Título opcional

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 569.621 ↓ 73.3 5,495 1

For exampGroup (cost=10,038.51..10,072.10 rows=75 width=142) (actual time=518.709..569.621 rows=5,495 loops=1)

  • Group Key: lawsuit_clients_history.sys_period, lawsuit_clients_history.stage, lawsuit_clients_history.status, lawsuit_clients_history.provision, lawsuit_clients_history.client_lawsuit_id, lawsuit_clients_history.date_insert, lawsuit_clients_history.state, lawsuit_clients_history.court, lawsuit_clients_history.value_cause_1a, lawsuit_clients_history.council, lawsuit_clients_history.justice, lawsuit_clients_history.law_firm, lawsuit_clients_history.prognostic, lawsuit_clients_history.polo
2. 0.000 563.921 ↓ 36.6 5,495 1

Gather Merge (cost=10,038.51..10,066.85 rows=150 width=142) (actual time=518.706..563.921 rows=5,495 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 75.987 1,562.526 ↓ 24.4 1,832 3

Group (cost=9,038.49..9,049.51 rows=75 width=142) (actual time=489.177..520.842 rows=1,832 loops=3)

  • Group Key: lawsuit_clients_history.sys_period, lawsuit_clients_history.stage, lawsuit_clients_history.status, lawsuit_clients_history.provision, lawsuit_clients_history.client_lawsuit_id, lawsuit_clients_history.date_insert, lawsuit_clients_history.state, lawsuit_clients_history.court, lawsuit_clients_history.value_cause_1a, lawsuit_clients_history.council, lawsuit_clients_history.justice, lawsuit_clients_history.law_firm, lawsuit_clients_history.prognostic, lawsuit_clients_history.polo
4. 1,288.107 1,486.539 ↓ 83.1 24,429 3

Sort (cost=9,038.49..9,039.22 rows=294 width=142) (actual time=489.174..495.513 rows=24,429 loops=3)

  • Sort Key: lawsuit_clients_history.sys_period, lawsuit_clients_history.stage, lawsuit_clients_history.status, lawsuit_clients_history.provision, lawsuit_clients_history.client_lawsuit_id, lawsuit_clients_history.date_insert, lawsuit_clients_history.state, lawsuit_clients_history.court, lawsuit_clients_history.value_cause_1a, lawsuit_clients_history.council, lawsuit_clients_history.law_firm, lawsuit_clients_history.polo
  • Sort Method: external merge Disk: 3488kB
5. 22.424 198.432 ↓ 83.1 24,429 3

Nested Loop (cost=0.42..9,026.43 rows=294 width=142) (actual time=17.030..66.144 rows=24,429 loops=3)

6. 132.048 132.048 ↓ 59.1 1,832 3

Parallel Seq Scan on lawsuit_clients_history (cost=0.00..8,863.22 rows=31 width=142) (actual time=16.774..44.016 rows=1,832 loops=3)

  • Filter: (((status)::text = ANY ('{ATIVO,ENCERRADO}'::text[])) AND (value_cause_1a >= '0'::double precision) AND (value_cause_1a <= '5e+21'::double precision) AND (value_sentence >= '0'::double precision) AND (value_sentence <= '5e+21'::double precision) AND ((justice)::text = 'CÍVEL'::text) AND ((prognostic)::text = 'PROVÁVEL'::text) AND (lower(sys_period) >= '2018-08-01 00:00:00'::timestamp without time zone) AND (lower(sys_period) <= '2019-06-01 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 35592
7. 43.960 43.960 ↓ 1.4 13 5,495

Index Only Scan using lawsuit_business_history_client_lawsuit_id_idx on lawsuit_business_history (cost=0.42..5.18 rows=9 width=4) (actual time=0.006..0.008 rows=13 loops=5,495)

  • Index Cond: (client_lawsuit_id = lawsuit_clients_history.client_lawsuit_id)
  • Heap Fetches: 27
  • QUERY PLAN
8. 0.158 55.012 ↑ 11.4 71 1

Sort (cost=146.63..148.65 rows=808 width=138) (actual time=55.009..55.012 rows=71 loops=1)

  • Sort Key: n.nspname, p.proname, (pg_get_function_arguments(p.oid))
  • Sort Method: quicksort Memory: 43kB
9. 1.378 54.854 ↑ 11.4 71 1

Hash Join (cost=1.14..107.61 rows=808 width=138) (actual time=42.495..54.854 rows=71 loops=1)

  • Hash Cond: (p.pronamespace = n.oid)
10. 53.465 53.465 ↓ 3.0 2,402 1

Seq Scan on pg_proc p (cost=0.00..89.30 rows=808 width=78) (actual time=0.052..53.465 rows=2,402 loops=1)

  • Filter: pg_function_is_visible(oid)
11. 0.004 0.011 ↑ 1.0 4 1

Hash (cost=1.09..1.09 rows=4 width=68) (actual time=0.011..0.011 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
12. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on pg_namespace n (cost=0.00..1.09 rows=4 width=68) (actual time=0.005..0.007 rows=4 loops=1)

  • Filter: ((nspname <> 'pg_catalog'::name) AND (nspname <> 'information_schema'::name))
Planning time : 0.476 ms