Re: Learned Index

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Deepak Balasubramanyam <deepak(dot)balu(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Learned Index
Date: 2017-12-12 09:16:39
Message-ID: 1513070199.2564.16.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Deepak Balasubramanyam wrote:
> I came across this paper making a case for indices that use machine learning to optimise search.
>
> https://arxiv.org/pdf/1712.01208.pdf
>
> The gist seems to be to use a linear regression model or feed a tensor flow model when a more complicated distribution is needed for the data and allow SIMD instructions working on top of GPUs / TPUs to speed up lookups. The speedup observed is anywhere from 40-60%.
>
> That result looks impressive but I don't have enough context on say rebuilding a neural net on every DML operation. The equivalent operation that I can relate to on PG would be to rebalance the B-tree for DML operations.
>
> In your opinion, would a ML model work for a table whose operations are both write and read heavy? I'd love to hear your thoughts on the paper.

I have read into the paper.

This may be interesting or not, but the paper is very vague about
its concepts and algorithms, so it's hard to tell.

I'd say that the paper does not meet publication standards.

For example, they say that their results were generated by comparing
a B-tree implementation with "learned indexes using a 2-stage
RMI model and different second-stage sizes (i.e., 10k, 50k, 100k, and 200k)",
but they don't say exactly what the neural network in these stages is
(at least it is not obvious to me). Their "Learning Index Framework" (LIF)
is described with a few vague sentences and a reference to the literature
saying that is where they got some ideas from.

There is also no clear concept of how these indexes should handle
data modifications, so I think that there are some loose ends to be
tied up before it is ready for implementation.

Finally, I don't see any clear statement as to the error guarantees
that the neural network prediction can give, and if it is possible that
it may degrade to scanning relevant parts of the table in some cases.

Yours,
Laurenz Albe

In response to

  • Learned Index at 2017-12-11 08:58:10 from Deepak Balasubramanyam

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2017-12-12 09:18:08 Re: [HACKERS] pg_stat_wal_write statistics view
Previous Message Amit Langote 2017-12-12 09:13:36 Re: [HACKERS] path toward faster partition pruning