Re: Fix quadratic performance of regexp match/split functions - Mailing list pgsql-hackers

From Kaiting Chen
Subject Re: Fix quadratic performance of regexp match/split functions
Date
Msg-id 153439086187.1388.4636958239048294213.pgcf@coridan.postgresql.org
Whole thread Raw
In response to Re: Fix quadratic performance of regexp match/split functions  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: Fix quadratic performance of regexp match/split functions
List pgsql-hackers
Applied cleanly for me. Here are my performance test results:

  count
---------
 3000000
(1 row)

Time: 3167.836 ms (00:03.168)
  count
----------
 10100000
(1 row)

Time: 6074.369 ms (00:06.074)
 count
-------
 10001
(1 row)

Time: 8.159 ms

The performance improves substantially in case 2 as advertised:

  count
---------
 3000000
(1 row)

Time: 3387.612 ms (00:03.388)
  count
----------
 10100000
(1 row)

Time: 43794.224 ms (00:43.794)
 count
-------
 10001
(1 row)

Time: 1436.587 ms (00:01.437)

I'll do some more testing to determine how this behaves in the presence of multibyte characters in UTF-8.

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Expression errors with "FOR UPDATE" and postgres_fdw with partitionwise join enabled.
Next
From: Michael Paquier
Date:
Subject: Re: Update comment in errcodes.txt correctly