0
votes

I have a table with a DATE column on it and I want to put an index on that column. But I happen to know values in that column are assigned sequentially. Mariadb uses B-trees by default, I think. Is this going to be a problem? Back in the old days this could create a "vine" in the index. and degrade performance. We are writing queries where date > (some date)

EDIT - a vine is a degenerate tree structure. Imagine this binary tree where 1 is the root. It's a valid binary tree but because the values were inserted sequentially, there's no 'tree' only a 'vine'; a single line of nodes.

1 -> 2 -> 3 -> 4 -> ...

I've never heard the term "vine" with respect to B-tree indexes. Can you provide a reference to this issue? I don't think sequential values will be any problem for the B-tree implementation in InnoDB, but I don't know for sure because I don't know what the "vine" issue is. - Bill Karwin