| Limit (cost=242.26..242.31 rows=20 width=158) |
| -> Sort (cost=242.26..242.38 rows=48 width=158) |
| Sort Key: (CASE c.user_status WHEN 3 THEN 1 WHEN 1 THEN 0 ELSE c.user_status END) DESC, c.updated_at DESC |
| -> GroupAggregate (cost=239.78..240.98 rows=48 width=158) |
| Group Key: c.id |
| -> Sort (cost=239.78..239.90 rows=48 width=154) |
| Sort Key: c.id |
| -> Nested Loop (cost=152.68..238.44 rows=48 width=154) |
| -> Index Only Scan using tbl_suppliers_pkey on tbl_suppliers supplier (cost=0.28..8.29 rows=1 width=4) |
| Index Cond: (id = 138) |
| -> Hash Right Join (cost=152.40..229.67 rows=48 width=154) |
| Hash Cond: (cm.contact_id = c.id) |
| -> Seq Scan on tbl_contact_mobiles cm (cost=0.00..76.52 rows=284 width=8) |
| Filter: (mp_open_id IS NOT NULL) |
| -> Hash (cost=151.80..151.80 rows=48 width=150) |
| -> Seq Scan on tbl_contacts c (cost=0.00..151.80 rows=48 width=150) |
| Filter: (supplier_id = 138) |