Hacker News new | ask | show | jobs
by bipin_nag 3922 days ago
I have a question. UNLINK will be more responsive than DELETE as it will not block and run it in background. But will subsequent requests be faster than DELETE. How will it behave if immediately followed by GET.

In background processing I think it is keeping the list of elements to delete. So when a GET is received it will check against that list too. The overhead will remain when you have to process incoming queries and deletion is not finished yet.

DELETE followed by GET takes x sec (mostly due to DELETE).

//In GET after DELETE time is not affected

UNLINK followed by GET1,GET2,... takes y1,y2... sec

//Will y1>y2>... until deletion finishes ?

Is this correct ? It looks like a trade-off, improving current latency at cost of later ones. (I feel it is worth it).