Project

General

Profile

Actions

Bug #4363

closed

Extend the combined GIN index (events_combined_idx)

Added by Radko Krkoš about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Design
Target version:
Start date:
10/11/2018
Due date:
% Done:

100%

Estimated time:
To be discussed:

Description

The GIN index "events_combined_idx" on the table "events" was designed to index all array type columns to cover some more complex filtering conditions by at least one of the array columns (currently: category, node_name, protocol, source_port, target_port, source_type, target_type, node_type, cesnet_resolvedabuses, cesnet_inspectionerrors).
Since its inception, new array type columns have been added and are accessible for filtering from the GUI. Therefore the index should be extended to cover these also.
The proposal is to replace the index as currently defined on columns:

category, node_name, protocol, source_port, target_port

with:
category, node_name, protocol, source_port, target_port, source_type, target_type, node_type, cesnet_resolvedabuses, cesnet_inspectionerrors

Because of the nature of GIN indices, additional columns add little size overhead. Also the order does not matter for GIN indices, the performance impact is negligible.

Remark:
An index such as proposed here was already created for testing on all hub, alt and dev with the name of "events_combined_new_idx".
A transition action in production therefore could be:

DROP INDEX events_combined_idx;
ALTER INDEX events_combined_new_idx RENAME TO events_combined_idx;

The change in Mentat source should be based on the information above.

Actions

Also available in: Atom PDF