pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan Wieck <janwieck@yahoo.com>
To: [Ikl_di] Lajos <il@mithrandir.hu>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Update in trigger
Date: Wed, 3 Apr 2002 11:44:59 -0500 (EST)
Message-ID: <200204031644.g33Gixc32234@saturn.janwieck.net> (raw)
In-Reply-To: <3CAA7942.592D079B@mithrandir.hu>

[Ikl_di] Lajos wrote:
[Charset iso-8859-2 unsupported, filtering to ASCII...]
> Hi,
> I have a problem with trigger in 7.1.3.
> I have a table with after insert trigger, which is making updates in
> another table.
> I recognized that the more records I have in first table the slower is
> my insert.
> If my trigger is doing something else, for example inserts in another
> table, it becomes * 20 times * quicker, and the speed of my insert
> doesn't depend on tablesize.
> Don't I have to make updates in trigger?

    Are  there  appropriate  indexes  on the table updated in the
    trigger and is the database "VACUUM ANALYZE"ed so the indexes
    get used?

    Even  if  it  is  an AFTER INSERT trigger, your INSERT has to
    wait until the trigger finishes, because it still has a right
    to abort the transaction.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #





view thread (4+ messages)  latest in thread

Message-ID: <200204031644.g33Gixc32234@saturn.janwieck.net>
Permalink:  ../200204031644.g33Gixc32234@saturn.janwieck.net/
Also on:    postgresql.org/message-id/200204031644.g33Gixc32234@saturn.janwieck.net

 · 

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-sql@postgresql.org
  Cc: janwieck@yahoo.com, il@mithrandir.hu
  Subject: Re: Update in trigger
  In-Reply-To: <200204031644.g33Gixc32234@saturn.janwieck.net>

* 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