| From: | Alexandre Felipe <alexandre(dot)felipe(at)tpro(dot)io> |
|---|---|
| To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | New access method for b-tree. |
| Date: | 2026-02-01 10:02:06 |
| Message-ID: | AS1PR02MB784695AFEC37179FFAF7EAE19A9DA@AS1PR02MB7846.eurprd02.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello Hackers,
Please check this out,
It is an access method to scan a table sorting by the second column of an index, filtered on the first.
Queries like
SELECT x, y FROM grid
WHERE x in (array of Nx elements)
ORDER BY y, x
LIMIT M
Can execute streaming the rows directly from disk instead of loading everything.
Using btree index on (x, y)
On a grid with N x N will run by fetching only what is necessary
A skip scal will run with O(N * Nx) I/O, O(N x Nx) space, O(N x Nx * log( N * Nx)) comput (assuming a generic in memory sort)
The proposed access method does it O(M + Nx) I/O, O(Nx) space, and O(M * log(Nx)) compute.
Kind Regards,
Alexandre Felipe
Research & Development Engineer
| Attachment | Content-Type | Size |
|---|---|---|
| btree_merge_rebased.patch | application/octet-stream | 54.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Tatsuya Kawata | 2026-02-01 09:09:43 | Re: [PATCH] ANALYZE: hash-accelerate MCV tracking for equality-only types |