Unmaintained repository. Development moved to: https://github.com/nordic-institute/X-Road-development
19
stars
8
forks
source link
As a Product Owner I want that a new partial index is created to messagelog database so that messages requiring timestamping will be fetched faster #120
Problem
PostgreSQL database has table named 'logrecord' that is used for storing all the messages handled by a Security Server. At the time when timestamper works, a lot of queries are made to find out the messages requiring timestamping (= non-timestamped messages). By using the partial index feature for fetching this data from 'logrecord' table, it makes this operation remarkable faster.
Partial index is created using the following command:
create index [concurrently] ix_not_timestamped_logrecord on logrecord(id, discriminator, signaturehash) where discriminator = 'm' and signaturehash is not null;
This partial index has to be created automatically by the system when the new version of Security Server is installed. Note that both fresh install and upgrade install must create the partial index.
Acceptance criteria
New partial index is created both during the fresh installation and upgrade installation of Security Server
Affected components: Messagelog Affected documentation: dm-ml_x-road_message_log._data_model Estimated delivery: Q2/2017 External reference: https://jira.csc.fi/browse/PVAYLADEV-609, https://jira.csc.fi/browse/PVAYLADEV-703
Problem PostgreSQL database has table named 'logrecord' that is used for storing all the messages handled by a Security Server. At the time when timestamper works, a lot of queries are made to find out the messages requiring timestamping (= non-timestamped messages). By using the partial index feature for fetching this data from 'logrecord' table, it makes this operation remarkable faster.
Partial index is created using the following command: create index [concurrently] ix_not_timestamped_logrecord on logrecord(id, discriminator, signaturehash) where discriminator = 'm' and signaturehash is not null;
This partial index has to be created automatically by the system when the new version of Security Server is installed. Note that both fresh install and upgrade install must create the partial index.
Acceptance criteria