Re: select with "like" from another table

Поиск
Список
Период
Сортировка
От chris smith
Тема Re: select with "like" from another table
Дата
Msg-id 3c1395330605290336q5c894215ge28eea597626c781@mail.gmail.com
обсуждение исходный текст
Ответ на select with "like" from another table  ("Anton Maksimenkov" <anton200@gmail.com>)
Ответы Re: select with "like" from another table  ("Anton Maksimenkov" <anton200@gmail.com>)
Список pgsql-performance
On 5/29/06, Anton Maksimenkov <anton200@gmail.com> wrote:
> Hi.
>
> I have 2 tables - one with calls numbers and another with calls codes.
> The structure almost like this:
...

How long does this query take?

SELECT code FROM a_voip_codes c, a_voip v where v.called_station_id
like c.code ||
'%' order by code desc limit 1

I wonder if you'll benefit from an index on a_voip(called_station_id)
to speed up this join.

--
Postgresql & php tutorials
http://www.designmagick.com/

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Anton Maksimenkov"
Дата:
Сообщение: select with "like" from another table
Следующее
От: Markus Schaber
Дата:
Сообщение: Re: Getting even more insert performance (250m+rows/day)