New access method for b-tree. - Mailing list pgsql-hackers

From Alexandre Felipe
Subject New access method for b-tree.
Date
Msg-id AS1PR02MB784695AFEC37179FFAF7EAE19A9DA@AS1PR02MB7846.eurprd02.prod.outlook.com
Whole thread Raw
List 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

pgsql-hackers by date:

Previous
From: Tatsuya Kawata
Date:
Subject: Re: [PATCH] ANALYZE: hash-accelerate MCV tracking for equality-only types
Next
From: Florents Tselai
Date:
Subject: Re: Patch: Add tsmatch JSONPath operator for granular Full Text Search