QUERY PLAN
Limit (cost=212.45..213.60 rows=20 width=381)
-> Unique (cost=212.45..247.52 rows=610 width=381)
-> Sort (cost=212.45..213.97 rows=610 width=381)
Sort Key: s.updated_at DESC, s.id, s.name, s.abbr, s.pinyin_shortcut, s.main_products, s.company_nature, s.website, s.established_at, s.capital, s.corp_rep, s.reg_address, s.telephone, s.fax, s.description, s.main_contact, s.created_by, s.created_at, s.working_address, s.capital_currency, s.payment_cycle, s.account_number
-> HashAggregate (cost=178.13..184.23 rows=610 width=381)
Group Key: s.id
-> Hash Right Join (cost=35.73..174.80 rows=1329 width=381)
Hash Cond: (c.supplier_id = s.id)
-> Seq Scan on tbl_contacts c (cost=0.00..135.58 rows=1329 width=4)
Filter: (supplier_id IS NOT NULL)
-> Hash (cost=28.10..28.10 rows=610 width=381)
-> Seq Scan on tbl_suppliers s (cost=0.00..28.10 rows=610 width=381)