-
1. Is indexing on Eners audit tables possible
adamw Mar 3, 2011 10:13 AM (in response to tsnyman)Envers mainly uses the revision number + id of the entity (origina id). So if you are reading history it may be useful to add indexes on these fields (which constitute the primary id of the audit entities).
Adam
-
2. Is indexing on Eners audit tables possible
tsnyman Mar 4, 2011 3:30 AM (in response to adamw)Thanks Adam,
If I have the following annotation for example to specify indexes for an entity that is marked as @Audited
@org.hibernate.annotations.Table(appliesTo = "table1", indexes = {
@Index(name = "column1_column2", columnNames = {"column1", "column2" })
})
an index column1_column2 is created on the main table table1. I was hoping, that a similar index would then be created on table1_aud so that if I read history with AuditReader API, I can specify criteria for these columns.
Do I have to manually create such and index as above on the _aud table
-
3. Is indexing on Eners audit tables possible
adamw Mar 5, 2011 4:45 AM (in response to tsnyman)Yes, I think indexes currently aren't copied over - so yes, you have to add them manually. They will be useful if you are doing history queries using those fields.
Please file a JIRA if you feels this an important issue. Also, any contributions are welcome! If you would like to approach creating a patch, let me know.
Adam -
4. Is indexing on Eners audit tables possible
tsnyman Mar 7, 2011 6:01 AM (in response to adamw)Thanks,
For now I am happy to create the indexes manually
-
5. Is indexing on Eners audit tables possible
lukasz.antoniak Mar 21, 2011 6:02 PM (in response to tsnyman)1 of 1 people found this helpful