Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS bad?) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but THIS bad?)
Date
Msg-id 16132.1148341666@sss.pgh.pa.us
Whole thread Raw
In response to Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Porting MSSQL to PGSQL -- triggers
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> How expensive is this going to be, especially for huge numbers of rows? 

Certainly cheaper than firing a per-row trigger.

> Would it be done for all queries, or just those with a per statement 
> trigger, or only when explicitly requested?

Just when there's a per-statement AFTER trigger, I would think.  One of
the tricky parts is to minimize overhead if the trigger never actually
asks for access to the rows.  However, if all we do during the statement
is build a possibly-lossy bitmap, I don't think the overhead will be
bad.

It might be interesting to think about reimplementing the RI triggers
as per-statement, too ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Porting MSSQL to PGSQL (Was: [OT] MySQL is bad, but
Next
From: Bruno Wolff III
Date:
Subject: Re: group by points