From: | Jan Danielsson <jan(dot)m(dot)danielsson(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | CREATE FUNCTION ... performance boost? |
Date: | 2007-06-29 15:59:07 |
Message-ID: | 46852C4B.4070809@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hello all,
In order to speed up commonly used queries, I use prepared
statements. I assume that 'prepare' tells some database query planner to
take a look at a query, and do all preparations for it, then store those
preparations somewhere for when it's needed.
When I use CREATE FUNCTION to create a function, does that also get
"planned" automatically (plsql, specifically). My gut feeling is that it
doesn't (mainly since it can be any external language).
The reason I'm asking is because I'd like to have permanently stored
"prepared" statements in a database. On even intervals, I connect to it,
and perform a number of queries. Many of them are the same statements
being run over and over. And these prepared statements really are "hard
coded", so they would do fine in my database initialization script.
I assume that "functions" aren't what I am looking for.. But is is
possible to store preparations some way so they survive past
connection/disconnections?
- --
Kind regards,
Jan Danielsson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)
iD8DBQFGhSxLuPlHKFfKXTYRCjb0AJ4utz24vsbwNkU0dGMpPyqg/c7azACfW+b7
0Ecy+yD3ayrvR+C+B8G9shQ=
=NFfn
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2007-06-29 16:25:52 | Re: CREATE FUNCTION ... performance boost? |
Previous Message | Andrew Sullivan | 2007-06-29 15:36:15 | Re: db replication |