Re: [firebird-support] Not Exists cost

2012-04-03 Thread Tomasz Tyrakowski
SELECT * FROM A_TABLE at WHERE at.VALUE1 = 'Y' AND NOT EXISTS ( SELECT 1 FROM B_TABLE bt WHERE bt.VALUE2 = 'X'); The query PLAN would tell you for certain, but I would expect the answer to be: half of A_TABLE rows times all of B_TABLE rows. If there's an index on

RE: [firebird-support] Not Exists cost

2012-04-03 Thread Rick Debay
PLAN (B_TABLE NATURAL) PLAN (AT INDEX (IDX_A_TABLE)) Does this mean that for every single row selected from table A, it touches every single row from table B? -Original Message- From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Leyne, Sean

RE: [firebird-support] Not Exists cost

2012-04-03 Thread Rick Debay
Whether Firebird takes advantage of this fact That was my hope, but I don't think that's happening. -Original Message- From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Tomasz Tyrakowski Sent: Tuesday, April 03, 2012 3:31 AM To:

Re: [firebird-support] Not Exists cost

2012-04-03 Thread Marc Gilels
I don't know if Tom told you but your suggestion to see the real error code led my programmer to release a new version THAT WORKKED!!..I can not thank you enough. -Original Message- From: Leyne, Sean s...@broadviewsoftware.com To: firebird-support

[firebird-support] Working with transactions

2012-04-03 Thread Russell Rose
I was wondering if there was any way to determine if there is a pending transaction outstanding. I have a single connection to a database and have something like the following code: FbConnection conn; FBCommand cmd = conn.CreateCommand();; cmd.Transaction = conn.BeginTransaction(); I then

[firebird-support] Stored procedure execution time

2012-04-03 Thread esbreidenbach
Hi, I have an application which executes a stored procedure in Firebird 1.5.6 on a fairly regular basis (multiple times per day). Immediately following a backup/restore of the database, the procedure runs fairly quickly (less than a second or two) at any time of day. Gradually, over time