explain.depesz.com

A tool for finding a real cause for slow queries.

Result: Qml

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Join (cost=20269.23..39823.89 rows=78 width=1098) (actual time=.. rows= loops=)

  • Hash Cond: (u.customer_id = c.id)
2. 0.000 0.000 ↓ 0.0

Merge Join (cost=20212.75..39747.20 rows=51 width=942) (actual time=.. rows= loops=)

  • Merge Cond: (m.id = sm.member_id)
  • Join Filter: (circle(center(m.geom), (width(m.geom) / 2::double precision)) @> point(p.lon, p.lat))
3. 0.000 0.000 ↓ 0.0

Index Scan using map_marker_pkey on map_marker m (cost=0.00..17523.00 rows=201422 width=906) (actual time=.. rows= loops=)

4. 0.000 0.000 ↓ 0.0

Sort (cost=20212.66..20339.82 rows=50864 width=56) (actual time=.. rows= loops=)

  • Sort Key: sm.member_id
5. 0.000 0.000 ↓ 0.0

Hash Join (cost=10535.27..16236.53 rows=50864 width=56) (actual time=.. rows= loops=)

  • Hash Cond: (sm.shared_item_id = si.id)
6. 0.000 0.000 ↓ 0.0

Seq Scan on shared_members sm (cost=0.00..4176.27 rows=271027 width=8) (actual time=.. rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash (cost=10521.57..10521.57 rows=1096 width=52) (actual time=.. rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash Join (cost=10180.54..10521.57 rows=1096 width=52) (actual time=.. rows= loops=)

  • Hash Cond: (si.owner_id = us.id)
9. 0.000 0.000 ↓ 0.0

Seq Scan on shared_item si (cost=0.00..308.16 rows=5840 width=16) (actual time=.. rows= loops=)

  • Filter: (type = 'C'::bpchar)
10. 0.000 0.000 ↓ 0.0

Hash (cost=10177.57..10177.57 rows=238 width=44) (actual time=.. rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=84.40..10177.57 rows=238 width=44) (actual time=.. rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..189.62 rows=1 width=32) (actual time=.. rows= loops=)

  • Join Filter: (u.customer_id = us.customer_id)
13. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..28.63 rows=1 width=24) (actual time=.. rows= loops=)

14. 0.000 0.000 ↓ 0.0

Index Scan using message_time_index on messages msg (cost=0.00..20.34 rows=1 width=16) (actual time=.. rows= loops=)

  • Index Cond: ((gmt_date >= '2011-08-25 00:00:00'::timestamp without time zone) AND (gmt_date <= now()))
  • Filter: ((at_location IS NULL) AND (msgtype = 1100))
15. 0.000 0.000 ↓ 0.0

Index Scan using unit_pkey on unit u (cost=0.00..8.28 rows=1 width=8) (actual time=.. rows= loops=)

  • Index Cond: (u.id = msg.unit_id)
16. 0.000 0.000 ↓ 0.0

Seq Scan on users us (cost=0.00..154.90 rows=487 width=8) (actual time=.. rows= loops=)

  • Filter: ((us.name)::text = 'main'::text)
17. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on point p (cost=84.40..9930.58 rows=2550 width=28) (actual time=.. rows= loops=)

  • Recheck Cond: ((p.unit_id = msg.unit_id) AND (p."time" >= (msg.gmt_date - '03:30:00'::interval)) AND (p."time" <= (msg.gmt_date + '03:30:00'::interval)))
  • Filter: ((p.insert_time >= '2011-08-26 00:00:00'::timestamp without time zone) AND (p.knots < 5) AND (p.insert_time <= now()))
18. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on unit_time_point (cost=0.00..84.23 rows=2550 width=0) (actual time=.. rows= loops=)

  • Index Cond: ((p.unit_id = msg.unit_id) AND (p."time" >= (msg.gmt_date - '03:30:00'::interval)) AND (p."time" <= (msg.gmt_date + '03:30:00'::interval)))
19. 0.000 0.000 ↓ 0.0

Hash (cost=45.66..45.66 rows=866 width=164) (actual time=.. rows= loops=)

20. 0.000 0.000 ↓ 0.0

Seq Scan on customers c (cost=0.00..45.66 rows=866 width=164) (actual time=.. rows= loops=)