Re: [firebird-support] What is more effective execute block or select?

2016-01-29 Thread hamacker sirhamac...@gmail.com [firebird-support]
Thanks, it´s clear now. 2016-01-27 14:27 GMT-02:00 Ann Harrison aharri...@ibphoenix.com [firebird-support] : > >

Re: [firebird-support] What is more effective execute block or select?

2016-01-28 Thread Svein Erling Tysvær setys...@gmail.com [firebird-support]
No, I must admit limited knowledge of MERGE. For Firebird 3 is seems like a good alternative, but I think Fb 2.1 and 2.5(?) requires a WHEN NOT MATCHED THEN INSERT clause (which is typically not desirable in these cases). Set 2016-01-28 13:31 GMT+01:00 Mark Rotteveel m...@lawinegevaar.nl

Re: [firebird-support] What is more effective execute block or select?

2016-01-28 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On Thu, 28 Jan 2016 16:22:03 +0100, "Svein Erling Tysvær setys...@gmail.com [firebird-support]" wrote: > No, I must admit limited knowledge of MERGE. For Firebird 3 is seems like a > good alternative, but I think Fb 2.1 and 2.5(?) requires a WHEN NOT MATCHED >

Re: [firebird-support] What is more effective execute block or select?

2016-01-28 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Wed, Jan 27, 2016 at 5:01 PM, setysvar setys...@gmail.com [firebird-support] wrote: > >If the question is which is likely to perform better, then the answer > is the select. > ... > >In general, execute block should be used when you want to change what >

Re: [firebird-support] What is more effective execute block or select?

2016-01-28 Thread Helen Borrie hele...@iinet.net.au [firebird-support]

Re: [firebird-support] What is more effective execute block or select?

2016-01-28 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On Wed, 27 Jan 2016 23:01:50 +0100, "setysvar setys...@gmail.com [firebird-support]" wrote: > [..] On the other hand, there are cases > where EXECUTE BLOCK can help performance (note, I speak for 2.5, I know > nothing about Firebird 3): > > UPDATE h > SET =

Re: [firebird-support] What is more effective execute block or select?

2016-01-27 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Wed, Jan 27, 2016 at 7:48 AM, hamacker sirhamac...@gmail.com [firebird-support] wrote: > > > I would know whats methods is more effective, per exemple: > Example below shows two convoluted ways to return 'Y' or 'N' depending on whether an item with a

Re: [firebird-support] What is more effective execute block or select?

2016-01-27 Thread setysvar setys...@gmail.com [firebird-support]
>If the question is which is likely to perform better, then the answer is the select. >Select statements can be compiled and optimized once and reused, avoiding >validating access and metadata references. The execute block must be compiled, >optimized, and access checked each time it's

Re: [firebird-support] What is more effective execute block or select?

2016-01-27 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On Wed, 27 Jan 2016 10:48:49 -0200, "hamacker sirhamac...@gmail.com [firebird-support]" wrote: > I would know whats methods is more effective, per exemple: > To know if itens exists or not, select: > select > case > when exists(select 1 from cv_itens where

[firebird-support] What is more effective execute block or select?

2016-01-27 Thread hamacker sirhamac...@gmail.com [firebird-support]
I would know whats methods is more effective, per exemple: To know if itens exists or not, select: select case when exists(select 1 from cv_itens where id_cv=51716) then 'Y' else 'N' end as existe_itens from rdb$database OR using block execute: execute block returns(exist