QUERY PLAN
Sort (cost=333.87..337.29 rows=1368 width=57)
Sort Key: c.pinyin1, c.namecut1, c.pinyin2, c.namecut2, c.pinyin3, c.namecut3, c.pinyin4, c.namecut4, c.created_at DESC
-> HashAggregate (cost=248.93..262.61 rows=1368 width=57)
Group Key: c.id
-> Hash Right Join (cost=156.98..245.51 rows=1368 width=57)
Hash Cond: (cm.contact_id = c.id)
-> Seq Scan on tbl_contact_mobiles cm (cost=0.00..76.56 rows=4556 width=4)
-> Hash (cost=139.88..139.88 rows=1368 width=57)
-> Seq Scan on tbl_contacts c (cost=0.00..139.88 rows=1368 width=57)
Filter: (supplier_id IS NOT NULL)