Making use of the log table on the log_server

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Making use of the log table on the log_server

Postby swingman » Thu Dec 03, 2020 2:02 pm

Hi all,

we have been logging all changes to critical tables in our system for a while now and would like to investigate changes made to certain records in the past.
The log table is very large and queries are very slow because there are no indexes to help the query. This in PostgreSQL 12.4.

Now, if I add indexes to the log table my searches will become fast, but the insert speed may drop (by how much?)
Has anyone done this? What happened?

We may be able to get away with partial indexes, i.e. only index the events we are interested in.

Another option is to restore a backup of the log server and index that copy.

I'd like to hear some views and experiences!
Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK
http://www.batchelorassociates.co.uk

http://www.postgresql.org - The world's most advanced open source database.
User avatar
swingman
 
Posts: 1472
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 7 guests

cron