On 11/01/2008, Jessi Berkelhammer <jberkelhammer@xxxxxxxx> wrote: > Hello. > > I'm trying to figure out why a query I'm doing is incredibly slow (~10 > minutes.) The incredibly slow query is something like: > > SELECT count(*) from registration LEFT JOIN person USING (person_id) > WHERE x_program(registration.x_type_code) = 'blah'; Hello what do you do in x_program function? Are you sure so it is fast? Regards Pavel Stehule ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org/