Re: help with getting index scan

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: help with getting index scan
Дата
Msg-id 1015396500.1406.93.camel@linda
обсуждение исходный текст
Ответ на Re: help with getting index scan  ("Thomas T. Thai" <tom@minnesota.com>)
Список pgsql-general
On Wed, 2002-03-06 at 06:08, Thomas T. Thai wrote:
> On Wed, 6 Mar 2002, Masaru Sugawara wrote:
>
> Both of your queries generated an error:
>
> ERROR:  parser: parse error at or near "WHERE"
>
> I can't see which where it is though.
>
> [...]
> >  I would think there is obviously room for more research. To force the planner
> >  use the InitPlan, my two queries are changed a bit:
> >
> > set enable_seqscan to on;
> > explain analyze   --- (1')
> > SELECT *
> >   FROM (SELECT p.name, p.address, p.city, p.state,
> >                geo_distance((SELECT point(z.longitude, z.latitude)
> >                                FROM zipcodes AS z
> >                               WHERE z.zip_code='55404'),
> >                              point(p.long, p.lat)) as dist
> >           FROM phone_address AS p,
> >                (SELECT * FROM phone_cat WHERE nameftx ## 'salon') AS pc,
> >                phone_cat_address AS pca,

probably that comma after pca

> >          WHERE pc.cid = pca.cid AND pca.aid = p.aid
> >        ) AS ss
> >  WHERE ss.dist < 35
> >  ORDER BY ss.dist
> > LIMIT 20;

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "The LORD is my light and my salvation; whom shall I
      fear? the LORD is the strength of my life; of whom
      shall I be afraid?"           Psalms 27:1


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

Предыдущее
От: "Thomas T. Thai"
Дата:
Сообщение: Re: help with getting index scan
Следующее
От: "Thomas T. Thai"
Дата:
Сообщение: Re: help with getting index scan