From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Trigger vs web service |
Date: | 2011-04-04 16:57:11 |
Message-ID: | 4D99F867.3020403@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 04/04/11 8:47 AM, Marc-André Goderre wrote:
>
> 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).
>
I would expect parsing and splitting your string into fields before
handing it to SQL would be faster than handing it into SQL, then using a
trigger to hack it into 2 fields. This would, of course, at least
partially depend on what sort of language that web service is written
in, if its in some hypothetical horribly inefficient interpreted
language, all bets are off.
Does all your data go through a web service now? if not, what data
path IS it coming from?
From | Date | Subject | |
---|---|---|---|
Next Message | Marc-André Goderre | 2011-04-04 17:19:43 | Re: Trigger vs web service |
Previous Message | Tom Lane | 2011-04-04 16:19:37 | Re: Merged Model for libpq |