Skip to content

Tag: indexing

How to make postgres not use a particular index?

I have the following query: As you can see, the cost of the last index scan on chaindata_tokentransfer_chain_id_block_number_tx_eeeac2a4_idx is very high. And the query is timing out. If I remove the filter on chain_id and block_number from the query, then the query is executing in a reasonable amount of time…

How does a multi-column index work in MySQL?

More specifically, what data structure does MYSQL use for multi-column indexing? I know MYSQL use Btree for indexing, which can only index one column. How does multi-column indexing work then? Answer Think of a MySQL “composite” index this way. Concatenate all the columns in the index together, th…

Multi-column Index on a filter & sort by query

I am executing an query of type: Query: Table: entity also has an index (Btree) on it as such – Index: But it seems that this type of index is of no use on the above query. Can anyone suggest what kind of index would better serve this type of use-case? Some Additional Information – The Table is qu…