[firebird-support] Re: Encouraging Firebird to use an index on a LEFT JOINED table

2014-07-28 Thread Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
28.07.2014 06:15, Robert martin wrote: Have the following (cut down) ordered SQL SELECT * FROM Document d LEFT JOIN DocumentCreator dc ON dc.DocCreatorRef = d.DocCreatorRef ORDER BY dc.Description There is an Index on dc.Description but it is not used. Plan shown below.. PLAN SORT

[firebird-support] FULL JOIN = lousy performance?

2014-07-28 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
I tried to see how values were distributed across two tables, and tried something similar to (slightly simplified): SELECT COALESCE(A.F1, B.F1), COALESCE(A.F2, B.F2), CASE WHEN A.PK IS NULL THEN 'B only' WHEN B.PK IS NULL THEN 'A only' ELSE 'Both' END

[firebird-support] Re: FULL JOIN = lousy performance?

2014-07-28 Thread Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
28.07.2014 12:56, Svein Erling Tysvær wrote: The server where I ran the queries is a Firebird 2.5.1 SuperServer installation. It might be an interesting challenge to try v3.0 Beta, as it has a completely different FULL JOIN implementation. Dmitry

Re: [firebird-support] Skip records

2014-07-28 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Jul 22, 2014, at 9:47 AM, 'checkmail' check_m...@satron.de [firebird-support] firebird-support@yahoogroups.com wrote: I would like to read every n record, depending on number of records. Do you care if your results are repeatable? If so, you'll have to sort all the records then skip

RE: [firebird-support] Skip records

2014-07-28 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
Ann, On Jul 22, 2014, at 9:47 AM, 'checkmail' check_m...@satron.de [firebird- support] firebird-support@yahoogroups.com wrote: I would like to read every n record, depending on number of records. Do you care if your results are repeatable?  If so, you'll have to sort all the records then

Re: [firebird-support] Skip records

2014-07-28 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
Ann, On Jul 22, 2014, at 9:47 AM, 'checkmail' check_m...@satron.de [firebird- support] firebird-support@yahoogroups.com wrote: I would like to read every n record, depending on number of records. Do you care if your results are repeatable? If so, you'll have to sort all the records then

RE: [firebird-support] Skip records

2014-07-28 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
On Jul 22, 2014, at 9:47 AM, 'checkmail' check_m...@satron.de [firebird- support] firebird-support@yahoogroups.com wrote: I would like to read every n record, depending on number of records. Do you care if your results are repeatable? If so, you'll have to sort all the records then

RE: [firebird-support] Skip records

2014-07-28 Thread 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
Thomas, I usually solve this kind of problem with recusive CTEs providing a counter for the records returned, thus a simple select statement can nicely filter on this kind of property without row numbers functionality. Can you provide an example, please. I, for one, can't imagine how a CTE

[firebird-support] Re: Very long transaction start after deleting a big number of records.

2014-07-28 Thread brucedickin...@wp.pl [firebird-support]
Thanks guys. I haven't thought about scanning all the rows with SELECT after DELETE but it might be something. Perhaps FB 3.0 will help us with this.