From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | "Thomas T(dot) Thai" <tom(at)minnesota(dot)com> |
Cc: | Masaru Sugawara <rk73(at)sea(dot)plala(dot)or(dot)jp>, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: help with getting index scan |
Date: | 2002-03-06 06:34:58 |
Message-ID: | 1015396500.1406.93.camel@linda |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)Elphick(at)lfix(dot)co(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas T. Thai | 2002-03-06 06:51:15 | Re: help with getting index scan |
Previous Message | Marshall Spight | 2002-03-06 06:20:09 | Re: Conditional Statement |