Re: [PERFORM] select with "like" from another table

2006-05-29 Thread Anton Maksimenkov
> 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 billing=# explain analyze SELECT code F

Re: [PERFORM] select with "like" from another table

2006-05-29 Thread chris smith
On 5/29/06, Anton Maksimenkov <[EMAIL PROTECTED]> 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 b