db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: Ideas for optimisation needed
Date Fri, 21 Dec 2012 17:40:23 GMT
John English <john.foreign@gmail.com> writes:

> On 20/12/2012 14:12, Jean-Yves Linet wrote:
>> Hi,
>> May you could give more details about the structure of your table.
> The table looks like this:
> CREATE TABLE system_log (
>   time        TIMESTAMP     DEFAULT NULL,
>   username    VARCHAR(15),
>   facility    VARCHAR(15)   NOT NULL,
>   event       VARCHAR(31)   NOT NULL,
>   module      VARCHAR(15),
>   test        VARCHAR(255),
>   details     VARCHAR(32000),
>   CONSTRAINT systemlog_pk   PRIMARY KEY (id)
> );
> I'm actually displaying a formatted view of the table:

If you run the query with derby.language.logQueryPlan=true and check
derby.log, does the query plan say that log_index is used?

Does it change anything if you access the table directly instead of via
the view? I think we've had reports that the optimizer cannot always see
through the views and misses out on some opportunities for optimization.

Knut Anders

View raw message