Hi,

On 2018-03-23 21:28:22 +0100, b...@e8s.de wrote:
> I have a table api.issues that has a text column "body" with long texts 
> (1000+ chars). I also wrote a custom function "normalizeBody" with plv8 that 
> is a simple Text -> Text conversion. Now I created an index applying the 
> function to the body column, so I can quickly run
> 
> SELECT * FROM api.issues WHERE normalizeBody(body) = normalizeBody($1)
> 
> The issue is, that the planning time is very slow (1.8 seconds). When I 
> replace "normalizeBody" with "md5", however, I get a planning time of 0.5ms.

How long does planning take if you repeat this? I wonder if a good chunk
of those 1.8s is initial loading of plv8.

Greetings,

Andres Freund

Reply via email to