Subject | Re: Can I cache prepared statements in my own pool? |
---|---|
Author | fedd_kraft |
Post date | 2005-07-08T10:05:49Z |
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@a...> wrote:
Oh I knew it was like that :(
Russian, 'konechnoe') quantity of possible statements in my
application, for example, 15. If preparings cost 10 - 40 ms, why not
to do it beforehand. But I also use a (built-in) connection pool.
So should I prepare 15x10 (pool size) statements and keep them in an
object that holds pooling data source also? Or there is some mechanizm
automating that?
And how much is memory price of prepared statement keeping?
F.
<rrokytskyy@a...> wrote:
> Prepared statements belong to the connection. You cannot preparestatement
Oh I knew it was like that :(
> in one connection and use with another. So, you can create your ownpool of
> statements, but it must also pool connections. But in this case justuse the
> FBWrappingDataSource or FBConnectionPoolDataSource - that is whatyou want
> to implement.I want to gain advantage of that I have 'finite' (in
Russian, 'konechnoe') quantity of possible statements in my
application, for example, 15. If preparings cost 10 - 40 ms, why not
to do it beforehand. But I also use a (built-in) connection pool.
So should I prepare 15x10 (pool size) statements and keep them in an
object that holds pooling data source also? Or there is some mechanizm
automating that?
And how much is memory price of prepared statement keeping?
F.