Re: Trigger vs web service

From: Jorge Godoy <jgodoy(at)gmail(dot)com>
To: Marc-André Goderre <magoderre(at)cgq(dot)qc(dot)ca>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trigger vs web service
Date: 2011-04-05 14:13:59
Message-ID: BANLkTi=+r3ikNgCgUTS3JonRGDiSvyCquQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If I was Yoda, I would say "The answer you seek is... it depends"

If I were you, I would test both solutions and check which one performs
better and impacts the least on your environment.

For example, if you have no logic at all on the database then I would code
that in the frontend. If you have code in the database, then checking how
this specific function works there would also be worth a shot.

--
Jorge Godoy <jgodoy(at)gmail(dot)com>

On Tue, Apr 5, 2011 at 09:16, Marc-André Goderre <magoderre(at)cgq(dot)qc(dot)ca>wrote:

>
>
> I receive a long string (about 1 per second) than content many information.
> For the moment it is directly inserted in the database (1 column).
>
> I have to treat the hole string every time i need information in it.
>
>
>
> Now, I want split the sting and save the informations in differents fields.
>
> I have 2 solutions and would like to have your opinion on them.
>
>
>
> 1- Program a trigger function detecting the orginal insert, split the
> string and fill the other field.
>
> 2- Program a web service for receiving the string, split it and insert the
> informations in the db.
>
>
>
> Witch is the fastest one (in performance).
>
>
>
> Thanks
>
>
>
> *Marc-Andre Goderre***
>
> TI Analyst
>
>
>
>
> --
> Ce message a été vérifié par le service de sécurité pour courriels *
> LastSpam* <http://www.lastspam.com>.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message rihad 2011-04-05 14:35:41 Re: Named advisory locks
Previous Message Merlin Moncure 2011-04-05 13:57:04 Re: Plpgsql function to compute "every other Friday"