pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <smarlowe@g2switchworks.com>
To: Alexandru Coseru <alexandru.coseru@totaltelecom.ro>
Cc: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Regex performance issue
Date: Sat, 02 Dec 2006 19:31:37 -0600
Message-ID: <1165109498.25316.15.camel@localhost.localdomain> (raw)
In-Reply-To: <024601c71675$81277560$3cb16956@alex>
References: <030b01c71651$984577c0$8300a8c0@tridecap.com>
	<01ea01c71653$438254e0$3cb16956@alex>
	<4571F856.7090808@enterprisedb.com>
	<022c01c7165f$17f49e80$3cb16956@alex>
	<4571FFA6.6070804@enterprisedb.com>
	<024601c71675$81277560$3cb16956@alex>

On Sun, 2006-12-03 at 02:53 +0200, Alexandru Coseru wrote:
> Hello..
> 
> Thanks for the tip , i think i have got the ideea..
> 
> I'm too tired too , and i will try it tommorow.
> 
> 
> Anyway , anybody has a clue why this regex is that CPU intensive ?  I did 
> not saw the light on my drives blinking , and also vmstat doesn't yeld any 
> blocks in or out...
> And how can it be optimized ?

I think it's just that you're running the regex across 5400 or so
elements.  at 850 or so milliseconds, that comes out to 150uS for each
comparison.  I'd say it's just the number of comparisons that have to be
made that's killing you here.



view thread (13+ messages)  latest in thread

Message-ID: <1165109498.25316.15.camel@localhost.localdomain>
Permalink:  ../1165109498.25316.15.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1165109498.25316.15.camel@localhost.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: smarlowe@g2switchworks.com, alexandru.coseru@totaltelecom.ro, heikki@enterprisedb.com
  Subject: Re: Regex performance issue
  In-Reply-To: <1165109498.25316.15.camel@localhost.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox