QUERY PLAN
Unique (cost=152.18..152.24 rows=1 width=380)
-> Sort (cost=152.18..152.19 rows=1 width=380)
Sort Key: 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.updated_at, s.working_address, s.capital_currency, s.payment_cycle, s.account_number
-> Group (cost=0.28..152.17 rows=1 width=380)
Group Key: s.id
-> Nested Loop Left Join (cost=0.28..152.17 rows=1 width=380)
Join Filter: (c.supplier_id = s.id)
-> Index Scan using tbl_suppliers_pkey on tbl_suppliers s (cost=0.28..8.29 rows=1 width=380)
Index Cond: (id = 689)
-> Seq Scan on tbl_contacts c (cost=0.00..143.86 rows=1 width=4)
Filter: ((supplier_id IS NOT NULL) AND (supplier_id = 689))