Conseil icon indicating copy to clipboard operation
Conseil copied to clipboard

Conseil needs new indices

Open leenpaws opened this issue 4 years ago • 2 comments

In order to fix the previously slow queries being performed due to sequential scan, new indices need to be added.

image

image

the following indices were added to prod2 and a remarkable increase in performance was seen

       	CREATE INDEX ix_manager_pubkey ON tezos.operations USING btree (manager_pubkey);
       	CREATE INDEX ix_operation_group_hash ON tezos.operations USING btree (operation_group_hash);
	CREATE INDEX ix_originated_contracts ON tezos.operations USING btree (originated_contracts);

After the change, the slowest queries were: image

image pgbadger-output.zip

leenpaws avatar Jun 03 '20 01:06 leenpaws

Attached is pgbadger output before and after the addition of the indices, ending in main3.html is before the addition.

leenpaws avatar Jun 03 '20 01:06 leenpaws

Is this ticket done, @leenpaws ?

ivanopagano avatar Jun 30 '20 09:06 ivanopagano