Table data covered entirely by indexes

Hi all.

I have a table that is entirely covered by indexes. That is, every query that I want to perform on the table can be satisfied entirely from indexes, without having to read the table data at all.

This may seem like a bizarre thing to want to do, but does anyone know if it’s possible to store the data in MySQL in just the indexes, without having to store the table data at all, since the table data is never actually accessed?

If this isn’t possible in MySQL, does anyone know of any alternatives? I know that certain column-based stores (for example, C-store) might allow this, by storing my indexes as a set of projections over the data.

Thanks.

Neil.

It’s not possible in MySQL, no.

How about InnoDB with a long primary key? Not smart if you have an additional index though.

In InnoDB, the primary key IS the table, so unless there is a secondary index, each value is stored only once, and the effect is that you have “only the index” as you wish.