On 20/12/2012 14:12, Jean-Yves Linet wrote:The table looks like this:
May you could give more details about the structure of your table.
CREATE TABLE system_log (
id INTEGER GENERATED ALWAYS AS IDENTITY,
time TIMESTAMP DEFAULT NULL,
facility VARCHAR(15) NOT NULL,
event VARCHAR(31) NOT NULL,
CONSTRAINT systemlog_pk PRIMARY KEY (id)
I'm actually displaying a formatted view of the table:
CREATE VIEW system_log_view AS
SELECT TimeFormat(time) AS t_time,
NameFormat(username) AS name,
id AS time
I had also suspected my formatting routines (TimeFormat, NameFormat), but I removed them and used "time as t_time" and "username as name" in place of the existing definitions of t_time and name. It made no noticeable difference.It's much slower than I would expect too!
Anyway the response delay you have seams to be very slow compare with what I
have with Derby.
Yes, I tried that too, and it also made no noticeable difference.
I always read my resultset as forward only.
Try to make a first request with select count(*) to have the number of rows.
and then a second request with an order by on time field and use only next() method.