Adding an index on the id field of messages when it's partitioned

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-Yves Chibon 2021-02-11 14:15:54 +01:00
parent 2b1ea425ed
commit c69127dbe6
2 changed files with 2 additions and 0 deletions

View file

@ -101,6 +101,7 @@ SELECT i,"timestamp",certificate,signature,topic,_msg,category,source_name,sourc
CREATE INDEX index_msg2_category ON public.messages2 USING btree (category);
CREATE INDEX index_msg2_timestamp ON public.messages2 USING btree ("timestamp");
CREATE INDEX index_msg2_topic ON public.messages2 USING btree (topic);
CREATE INDEX index_msg_id ON public.messages2 USING btree (id);
CREATE INDEX messages2_datanommer_timestamp_category_idx ON public.messages2 USING btree ("timestamp" DESC, category);
CREATE INDEX messages2_datanommer_timestamp_topic_idx ON public.messages2 USING btree ("timestamp" DESC, topic);