Re: help with getting index scan
От | Thomas T. Thai |
---|---|
Тема | Re: help with getting index scan |
Дата | |
Msg-id | Pine.NEB.4.43.0203060006580.8525-100000@ns01.minnesota.com обсуждение исходный текст |
Ответ на | Re: help with getting index scan (Masaru Sugawara <rk73@sea.plala.or.jp>) |
Ответы |
Re: help with getting index scan
Re: help with getting index scan |
Список | pgsql-general |
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, > WHERE pc.cid = pca.cid AND pca.aid = p.aid > ) AS ss > WHERE ss.dist < 35 > ORDER BY ss.dist > LIMIT 20; > > > set enable_seqscan to on; > explain analyze --- (2') > 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' > ORDER BY cid) AS pc, > phone_cat_address AS pca, > WHERE pc.cid = pca.cid AND pca.aid = p.aid > ) AS ss > WHERE ss.dist < 35 > ORDER BY ss.dist > LIMIT 20; -- Thomas T. Thai Minnesota.com, Inc.
В списке pgsql-general по дате отправления: