Laurenz Albe wrote:
> You have been ordered to use a partial index?
>
> > Apart from this I don't really understand why statement preparation
> > combined with parameters in functions prevent index invocation.
> > Especially since p_id_user is a parameter as well which doesn't
> > prevent the us
Rogatzki Rainer wrote:
> > > in a trigger-function (on update before):
> > >
> > > ...
> > > for c in
> > > select id_country, sum(cost) as sum_cost
> > > from costs
> > > where id_user = p_id_user
> > > and id_state = 1
> > > and date(request) between p_begin and p_until
>
am Fri, dem 05.12.2008, um 14:23:33 +0100 mailte Rogatzki Rainer folgendes:
> Hello Andreas,
>
> your hint did the trick - thank you very much!
glad to help you...
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, priva
> > Rogatzki wrote:
> > -- Example with bad performance since index isn't used
> > explain
> > select c.id_country, sum(c.cost) as sum_cost
> > from costs c, accounting_interval a
> > where c.id_user = 123
> > and c.id_state = 1
> > and a.id = 1
> > and date(c.request) between a.p_
am Fri, dem 05.12.2008, um 11:41:11 +0100 mailte Rogatzki Rainer folgendes:
> -- Example with bad performance since index isn't used
> explain
> select c.id_country, sum(c.cost) as sum_cost
> from costs c, accounting_interval a
> where c.id_user = 123
> and c.id_state = 1
> and a.id
> Rogatzki Rainer wrote:
> > I'm having problems with the following bad performing
select-statement
> > in a trigger-function (on update before):
> >
> > ...
> > for c in
> > select id_country, sum(cost) as sum_cost
> > from costs
> > where id_user = p_id_user
> > and id_state
Rogatzki Rainer wrote:
> I'm having problems with the following bad performing select-statement
> in a trigger-function (on update before):
>
> ...
> for c in
> select id_country, sum(cost) as sum_cost
> from costs
> where id_user = p_id_user
> and id_state = 1
> and date(r
Title: RE: [PERFORM] Trigger & Function
Thanks for the response. I was pretty sure it couldn't be done the way I wanted to but felt I would ask anyway.
Thanks again,
Duane
-Original Message-
From: Mike Nolan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 01, 2004 3
> My problem is I defined the "before" and "after"
> fields in the audit table as TEXT and when I try to move NEW or OLD into
> these fields I get the error "NEW used in query that is not in a rule".
You're trying to insert record data into a text field, that doesn't work.
OLD and NEW can be use