AW: man, I feel like a beginner ...

From: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'The Hermit Hacker'" <scrappy(at)hub(dot)org>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: AW: man, I feel like a beginner ...
Date: 2000-09-11 08:52:05
Message-ID: 11C1E6749A55D411A9670001FA68796336806D@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> someone notice anything wrong with this query? :) *slap forehead*
>
> explain
> SELECT distinct s.gid, s.created ,
> geo_distance(pd.location, '(-90.3690233918754,38.7788148984854)')
> FROM status s, personal_data pd, relationship_wanted rw ,
> personal_ethnicity pe , personal_religion pr , personal_bodytype pb
> WHERE s.active AND s.status != 0
> AND (s.gid = pd.gid AND pd.gender = 0)
> AND (s.gid = rw.gid AND rw.gender = 1)
> AND geo_distance( pd.location,
> '(-90.3690233918754,38.7788148984854)' ) <= 75
> ORDER BY geo_distance( pd.location,
> '(-90.3690233918754,38.7788148984854)'), s.created desc;

You have not restricted the join on pe, pr and pb leading to a cartesian
product ?

Andreas

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB 2000-09-11 09:06:59 AW: "setuid" functions, a solution to the RI privilege problem
Previous Message Hannu Krosing 2000-09-11 08:48:13 I'm unable to access CVS