List:Internals« Previous MessageNext Message »
From:Maxim Deviatov Date:November 7 2010 10:47pm
Subject:On-line cardinality for MEMORY tables
View as plain text  
Hi there,

a few years ago I was playing with B-tree index cardinality
of MEMORY storage engine and come up with a patch (attached)
implementing on-line cardinality calculation.

According to my benchmarks, in certain cases MEMORY table scan
may be up to 45% faster than index scan. But since MEMORY engine
doesn't provide cardinality for B-tree indexes, index scan is
always preferred over table scan.

The idea of the patch is to provide accurate cardinality for
B-tree indexes at any time.

Max overhead should be 5-10% slowdown of DELETE/UPDATE queries.

Have fun,
=====================
Maxim N. Deviatov

Attachment: [text/html]
Attachment: [text/x-patch] cardinality2.patch
Thread
On-line cardinality for MEMORY tablesMaxim Deviatov7 Nov
  • Re: On-line cardinality for MEMORY tablesLenz Grimmer22 Nov
    • Re: On-line cardinality for MEMORY tablesSergey Vojtovich26 Nov
  • Re: On-line cardinality for MEMORY tablesSergey Vojtovich20 Dec