explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VGkz

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=59,490.13..59,490.17 rows=15 width=60) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=59,490.13..59,490.17 rows=15 width=60) (actual rows= loops=)

  • Sort Key: (CASE WHEN (time_in_cs.last_changed_at IS NULL) THEN lists_entries.created_at ELSE time_in_cs.last_changed_at END) DESC NULLS LAST, lists_entries.id
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=58,254.49..59,489.84 rows=15 width=60) (actual rows= loops=)

  • Join Filter: ((time_in_cs.org_id = lists_entries.org_id) AND (time_in_cs.list_entry_id = lists_entries.id))
4. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=54,427.43..55,583.13 rows=15 width=44) (actual rows= loops=)

  • Hash Cond: (lists_entries.id = entity_values.list_entry_id)
5. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on lists_entries (cost=2,301.10..3,001.61 rows=57,386 width=44) (actual rows= loops=)

  • Recheck Cond: ((list_id = 45,620) AND (org_id = 7,644))
6. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=2,301.10..2,301.10 rows=358 width=0) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on lists_entries_list_id_index (cost=0.00..910.83 rows=57,386 width=0) (actual rows= loops=)

  • Index Cond: (list_id = 45,620)
8. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on lists_entries_pkey (cost=0.00..1,361.33 rows=77,986 width=0) (actual rows= loops=)

  • Index Cond: (org_id = 7,644)
9. 0.000 0.000 ↓ 0.0

Hash (cost=51,634.17..51,634.17 rows=39,373 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Index Scan using entity_values_value_dropdown_option_id_index on entity_values (cost=0.43..51,634.17 rows=39,373 width=4) (actual rows= loops=)

  • Index Cond: (value_dropdown_option_id = ANY ('{1458619,1458620,1470516,1470526,1470536,1470537,1470543,1470548,1470549,1470552,1470569,1470584,1470621,1470638,1470709,1470723,1470838,1470841,1470880,1470955,1471379,1471717,1471802,1472983,1473177,1473874,1478826,1726186,1852079,2063329,2063331,2163226,2181989,2181994,2248408,2280556,2321764,2321765,2321766,2321767}'::integer[]))
11. 0.000 0.000 ↓ 0.0

Materialize (cost=3,827.06..3,836.51 rows=270 width=16) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Subquery Scan on time_in_cs (cost=3,827.06..3,835.16 rows=270 width=16) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=3,827.06..3,832.46 rows=270 width=16) (actual rows= loops=)

  • Group Key: entity_value_changes.org_id, entity_value_changes.list_entry_id
14. 0.000 0.000 ↓ 0.0

Sort (cost=3,827.06..3,827.73 rows=270 width=16) (actual rows= loops=)

  • Sort Key: entity_value_changes.list_entry_id
15. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on entity_value_changes (cost=43.95..3,816.16 rows=270 width=16) (actual rows= loops=)

  • Recheck Cond: ((org_id = 7,644) AND (entity_attribute_id = 391,479))
  • Filter: (opp_id IS NOT NULL)
16. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on entity_value_changes_org_id_entity_attribute_id_index (cost=0.00..43.88 rows=1,932 width=0) (actual rows= loops=)

  • Index Cond: ((org_id = 7,644) AND (entity_attribute_id = 391,479))