Re: Please suggest me on my table design (indexes!)
| От | DaNieL..! |
|---|---|
| Тема | Re: Please suggest me on my table design (indexes!) |
| Дата | |
| Msg-id | 29222241-5e20-463a-b07b-fcbaf917d3db@k38g2000yqh.googlegroups.com обсуждение исходный текст |
| Ответ на | Please suggest me on my table design (indexes!) (DaNieL <daniele.pignedoli@gmail.com>) |
| Ответы |
Re: Please suggest me on my table design (indexes!)
|
| Список | pgsql-general |
Almost forgot: one fo the heavier select query can be:
-----
SELECT
contact.id,
contact.company_id,
contact.name AS nome,
contact.surname AS cognome,
contact.email AS email,
contact.company_name AS azienda
FROM
contact
WHERE
(
lower(contact.company_name) LIKE 'smit%' OR
lower(contact.name) LIKE 'smit%' OR
lower(contact.surname) LIKE 'smit%' OR
contact.phone LIKE 'smit%' OR
lower(contact.code) LIKE 'smit%' OR
lower(contact.email) LIKE 'smit%'
)
ORDER BY
contact.company_name ASC, contact.company_id DESC
-----
And this is the queyr plain: http://explain.depesz.com/s/Il
В списке pgsql-general по дате отправления: