rum icon indicating copy to clipboard operation
rum copied to clipboard

fast update

Open joseph-zh opened this issue 7 years ago • 5 comments

Hello

Recently,I use rum in my project. I want to use fast update like gin index. I check the previous Issues and find that the fast update is exist before.

So I want to know why delete the function.

Thanks!

Joseph

joseph-zh avatar Nov 28 '17 06:11 joseph-zh

Hello:

I browse the rum source, find that, in the function ruminsert(), it invoking function rumHeapTupleInsert(), the function's notes says: (non-fast-update) insertion. it mean that the fast update has be moved?

Can I use the rumfast.c in version 1.2?

Thanks!

Joseph

joseph-zh avatar Nov 29 '17 02:11 joseph-zh

Your right, fast update was removed. Current version of RUM doesn't support it. It was removed because when pending list becomes large updates and selects become slow. How slow are your updates?

za-arthur avatar Nov 29 '17 07:11 za-arthur

In my test case ,my table like this table rumtest(text info)

the info's length is about 30 thousand Chinese words. I split this word with bigram. next I transfer it to tsvector and add it to RUM;

the insert time is about 1.3 seconds.

I try to find out why my insert is slow and debug the program ,find that my test case in the function rumHeapTupleInsert take the longest time. about 95%. in the function rumHeapTupleInsert, the variable nentries is about 15 thousand, for (i = 0; i < nentries; i++) the loop process takes so long time.

so I need you help me analyze it

Thanks

joseph-zh avatar Nov 29 '17 08:11 joseph-zh

I believe that fast update won't help in your case. It is strange that rumHeapTupleInsert() takes 95%. Did you debug using perf? Can you share your Chinese text after splitting it with bigram?

za-arthur avatar Nov 29 '17 10:11 za-arthur

I write a function to calculate the time. I'm not familiar with perf.

Chinese text like this : 你好吗欢迎你来中国北京 after splitting it with bigram: 你好 好吗 吗欢 欢迎 迎你 你来 来中 中国 国北 北京

this like pg_trgm. but it split every two Chinexe characters。

joseph-zh avatar Nov 30 '17 01:11 joseph-zh