Closed claudio-silva closed 7 years ago
+1 on this. Would be nice to have as an option at least (not on by default but a variable) In case we want to option of archiving or deleting single rows.
Definitely a good point, going to look at this soon. I'd propose to add an auto incremental primary key id
as a new column, and also add a btree index on the time
column as well as a hash index on the channel
. Any other suggestions?
The level is also important (for ex, retrieve only warnings or above).
Is there any news about this feature ?
I see that this is a very useful and reasonable feature. In the mean time I was busy with other things and I can't promise at which point I will find time to implement this. If you want, please feel free to implement it and create a pull request. Otherwise, I guess it will be probably somewhere next year.
Ok I will create a pull request soon : Id : primary key time : btree index channel : hash index level : hash index Is it OK ? Any other suggestions ?
If we want to sort on the time field, or filter by channel or level, and the log table has many records, it could take a looong time... Also, if one needs to periodically truncate the log (for instance, discarding entries older than a given treshold) it would be slow. You should add indexes to those fields. You may also give the option of creating them if one needs them, for those people that, for some reason, may not want them.