Re: Trim performance on 9.5

From: vinny <vinny(at)xs4all(dot)nl>
To: William Ivanski <william(dot)ivanski(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-general-owner(at)postgresql(dot)org
Subject: Re: Trim performance on 9.5
Date: 2016-11-18 14:16:33
Message-ID: b03e0eaadb08647c104d4a378c328e4d@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2016-11-18 15:06, William Ivanski wrote:
> Hi,
>
> I recently did major improvements on perfomance on our routines by
> simply removing the call for trim functions on specific bottlenecks.
> Please see images attached for a simple example.
>
> I'm using PostgreSQL version 9.5.5-1.pgdg80+1 on Debian 8.6. Someone
> knows if it's a bug on trim function? Thanks in advance.
>
> --
>
> William Ivanski

Did you run EXPLAIN on these queries?

I'm guessing that you have an index on the field, but not on
TRIM(field),
which would mean that the database is forced to seqscan to fetch every
row value, trim it and then compare it.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jehan-Guillaume de Rorthais 2016-11-18 14:48:00 Re: Streaming replication failover/failback
Previous Message William Ivanski 2016-11-18 14:06:36 Trim performance on 9.5