db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rami Ojares <rami.oja...@pdf-comics.com>
Subject Re: Table functions and optimization
Date Mon, 22 Mar 2010 11:05:14 GMT
Damn! I'm sorry for bothering for no good reason.
I have seen VTICosting interface before but I had just forgotten about it.
I will try out what I can achieve with it.

- rami

On 20.3.2010 18:26, Rami Ojares wrote:
> Hi,
> I have a table function that queries 2 tables and calculates some 
> columns from them.
> All is going well.
> But when I start creating larger queries using that calculated table I 
> find it very hard to tell derby
> that please invoke that table function only once per query.
> First does a table function have some kind of rowcount because 
> rowcount is used by derby to decide how cheap it is to keep querying a 
> table again and again.
> Best would be some kind of way in function definition to tell derby 
> that invoke this table function only once per query and use the same 
> result you received over and over again.
> Currently I cache the last results of the table function for 3 seconds 
> which is obviously not optimal.
> - rami

View raw message