Echo's charts.

Hello, echo has 9 built-in tables. in some cases these tables become heavy and I need to file them. I need guidance on the responsibilities of each table so I can clear it when my business rule allows.

It's not a trivial task and, of course, if you do some mistake, you might delete valid data.
But in summary:

Table ECHO_LOG_BATCH contain fields ECHO_BATCH_ID (FK to ECHO_BATCH table) and ECHO_LOG_ID (FK to ECHO_LOG) table. Delete all records in this table which related ECHO_BATCH.STATUS = 2 (batch sent) and ECHO_LOG.STATUS = 1 (routed).

Once you do that, you can also delete the related records in ECHO_BATCH (where STATUS = 2) and ECHO_LOG (where STATUS = 1). You wouldn't be able to delete these records initially because they are referenced by table ECHO_LOG_BATCH.

1 Like

Hi Wagner,

Just looking at doing this too. What about the other tables that have a lot of data in them? ECHO_INCOMING_BATCH
ECHO_LOG_INCOMING_BATCH

Regards

Steve

Hi @Steve_Sinclair, it's the same approach, use with care. You can check Echo.Entities unit to have a better "high-level" idea of those classes. The two ones you mentioned have status fields. TEchoIncomingBatch.Status has a final state of TBatchIncomingStatus.Loaded. That means the data was loaded in the target database and will not be further processed. TEchoLogIncomingBatch is a detail of TEchoIncomingBatch.