Re: GIN improvements part 1: additional information - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: GIN improvements part 1: additional information
Date
Msg-id CAPpHfdvHZXDGNoGvi9qFQcXQnx_e3u9Rkumtx8gTwpx_EhF6JA@mail.gmail.com
Whole thread Raw
In response to Re: GIN improvements part 1: additional information  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: GIN improvements part 1: additional information
List pgsql-hackers
Last version of patch is attached.
WAL is debugged here. How it's actually working.
Also there was some refactoring, commenting and README update.
Benchmark scripts are also updated. Updated version is attached.
I did some benchmark comparison with different count of index entries. See results is tables below.


         event         |    master       |  16-entries     |  32-entries     |  64-entries     |  128-entries    |
-----------------------+-----------------+-----------------+-----------------+-----------------+-----------------+
 index_build           | 00:01:50.042658 | 00:01:53.79182  | 00:01:55.647561 | 00:01:52.677095 | 00:01:58.723898 |
 index_build_recovery  | 00:00:19        | 00:00:06        | 00:00:05        | 00:00:06        | 00:00:06        |
 index_update          | 00:05:18.215707 | 00:06:09.404842 | 00:05:49.015441 | 00:05:39.987697 | 00:05:38.723376 |
 index_update_recovery | 00:01:48        | 00:01:51        | 00:01:48        | 00:01:47        | 00:01:47        |
 search_new            | 00:25:21.481699 | 00:23:23.59775  | 00:25:13.943362 | 00:23:58.633514 | 00:22:30.763075 |
 search_updated        | 00:25:57.622592 | 00:25:29.867388 | 00:27:33.683614 | 00:25:17.565714 | 00:26:29.333003 |


     label     |    size    | 16-entries | 32-entries | 64-entries | 128-entries |
---------------+------------+------------+------------+------------+-------------+
 new           |  884514816 |  417013760 |  421240832 |  430350336 |   450994176 |
 after_updates | 1595252736 |  711368704 |  719380480 |  735682560 |   774275072 |

It's probably an option to select 64 entries instead of 32.
There is still some regression in update speed. However, there is also room for improvement patch. It searches item index entries 2 times on insert: in dataLocateLeafItem and dataPlaceToPage. We can save full results of dataLocateLeafItem, but it require some rework of gin btree interface: store not only offset of item.

------
With best regards,
Alexander Korotkov.
Attachment

pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Looking for information on our elephant
Next
From: Valentine Gogichashvili
Date:
Subject: Re: UTF8 national character data type support WIP patch and list of open issues.