Hi, If you have the data for more rows you could try to do batch inserts.
http://stackoverflow.com/questions/12365992/sql-bulk-insert-statement That reduces at least the roundtrips to the db... Regards, Sandor mike matrigali <[email protected]> írta: >I don't think there is anything specificly about a timestamp index vs >another index that is bad. All indexes will have an extra overhead >at insert/delete/update time as they are implemented as a separate file >maintaining an btree index on disk. For your application it would >depend if the benefit to queries that use the timestamp collumn out >weigh the overhead of maintaining the index. > >Providing performance advice is hard. About the only generic thing >i can say about insert performance is to do as many inserts as possible >in a single transaction so as to avoid I/O bound performance on the >synchronous write of the commit record. Also use and reuse prepared >statements as possible. > >There are a lot of successful derby applications doing large numbers of >inserts from evidence of past postings on derby user and derby developer >list. To get more help I suggest you post more details to the list >for those users to help. Best would be to include a reproducible test >case of the problem area, including source code. That makes it the most >likely you can get useful feedback. Also including some basic >performance goals would be good - ie. hoping to get N inserts of rows >with the following DDL in M seconds made by P concurrent threads on >X hardware with Y disk technology. > >On 1/8/2015 11:34 PM, kosurusekhar wrote: >> Hi Folks, >> >> We have three tables where will have lot insertions per minute. In all three >> tables we have TIMESTAMP columns, And we kept index for these timestamp >> columns. This timestamp values always system time when the row is inserted. >> >> My doubt is whether maintaining the index tree for this kind of data >> (timestamp) will be overhead for derby database. Because Timestamp contains >> including seconds also right, I feel personally to create index structure & >> maintaining this structure could be little overhead for derby server. >> >> Please correct me if I am wrong. In this scenario how to improve performance >> while huge insertions happening into these tables. >> >> Thanks in Advance. >> >> Regards >> Sekhar. >> >> >> >> >> -- >> View this message in context: >> http://apache-database.10148.n7.nabble.com/Index-for-TIMESTAMP-COLUMN-tp143572.html >> Sent from the Apache Derby Users mailing list archive at Nabble.com. >> > >
