Re: [SQL] INSERT waiting under heavy load

2006-01-08 Thread Andrew Sullivan
On Fri, Jan 06, 2006 at 04:49:09PM -0500, Tom Lane wrote:
> performance risk in the sort of scenario you are describing.
> (I'm not sure why it would manifest as transactions showing "INSERT
> waiting" state though.)

It's because of I/O.  When you have a large number of updates, the
planner always assumes an indexscan (correctly), but you end up
scanning megabytes of dead tuples.  With a large number of open
transactions, most of the time VACUUM can't recover the space.  I
agree with what Tom said earlier in this thread: the design is
guaranteed to lose.

A

-- 
Andrew Sullivan  | [EMAIL PROTECTED]
"The year's penultimate month" is not in truth a good way of saying
November.
--H.W. Fowler

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [SQL] Regular Expression Matching problem...

2006-01-08 Thread Mario Splivalo
On Wed, 2006-01-04 at 10:00 -0700, Michael Fuhr wrote:

> What Andreas is saying is that the patterns in the table have too
> many backslashes.  The original query was
> 
> test=> select '+385911234567' ~ '^\\+38591\\d{7}$';
>  ?column? 
> --
>  t
> (1 row)
> 
> but if you select just the pattern you get
> 
> test=> select '^\\+38591\\d{7}$';
> ?column?
> 
>  ^\+38591\d{7}$
> (1 row)

I was a bit silly here. Dunno why I tought I need to escape the
backslashes when entering regexp as data in table. Thank you for
pointing that out.

Mike


---(end of broadcast)---
TIP 6: explain analyze is your friend