Re: Query very slow when in plpgsql function - Mailing list pgsql-general

From Greg Sabino Mullane
Subject Re: Query very slow when in plpgsql function
Date
Msg-id 488efa144a2d43fe5f2cca7f78e9d642@biglumber.com
Whole thread Raw
In response to Query very slow when in plpgsql function  (Chris McDonald <chrisjonmcdonald@gmail.com>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> And when I execute the function with the same parameters it takes well
> over 5 minutes to execute.
>
> It seems as though inside a function, the optimizer wants to tablescan
> my 8M row table. Is there a way that I can see the query plans that my
> functions are using?

See my blog post on this:

http://blog.endpoint.com/2008/12/why-is-my-function-slow.html

It's also in the first page of hits when you google the subject
line of this thread. :)

- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 200912311751
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAks9Kz8ACgkQvJuQZxSWSsj72QCgvrcUOTF8cXyVkIZ29ky3YOmp
p+IAoOmgyTICVXBmndHADua3ypNC0ctK
=dZtE
-----END PGP SIGNATURE-----



pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Migration of db
Next
From: Andrew Lardinois
Date:
Subject: Save MySQL? HA