Subject | Re: [firebird-support] update from select |
---|---|
Author | niegil.thomas@topsyssolutions.com |
Post date | 2007-08-21T09:09:26Z |
Ann,
I have tried this multiple times, I have a query that updates from more than 7 tables . With different keyfields .So i used a query with multiple selects keeping a common matching key field selection using, And deleted and Inserted it. Although this is a correct concept Update for Updataion ,I really found this method faster when my query witrh multiple updates was slow.
Thanks
Niegil
I have tried this multiple times, I have a query that updates from more than 7 tables . With different keyfields .So i used a query with multiple selects keeping a common matching key field selection using, And deleted and Inserted it. Although this is a correct concept Update for Updataion ,I really found this method faster when my query witrh multiple updates was slow.
Thanks
Niegil
----- Original Message -----
From: Ann W. Harrison
To: firebird-support@yahoogroups.com
Sent: Monday, 20 August, 2007 8:22 PM
Subject: Re: [firebird-support] update from select
niegil.thomas@... wrote:
> Hi Sasha,
>
> I feel better than updating , Do Multiple selects in a
> query and delete the existing record from the table and
> append this query to the table i feel this will be faster .
>
> Please be carefull to uses all key fields properly.
>
> I found such a move to faster . Hope this Eg meets ur requirement .
Aside from such problems as inadvertently cascading deletes
through foreign key constraints and triggers, this method also
requires updating all fields, complicating index management
and garbage collection. Did you actually measure the performance
or are you guessing?
Generally, using UPDATE to change records and DELETE to remove
them makes codes easier to write, understand, and maintain.
Regards,
Ann
[Non-text portions of this message have been removed]