Re: [firebird-support] LEFT JOIN much faster than JOIN

2013-08-02 Thread Louis Kleiman (SSTMS, Inc.)
But LEFT OUTER JOIN may cause the optimizer to scan through the table for which all rows are being included in physical order while the INNER JOIN might cause a plan where rows are read based on a scan through an index. If rows aren't being filtered out, I can see how this might speed up the query

Re: [firebird-support] Pre and Post snapshot script that quiesces the Firebird Database

2013-02-14 Thread Louis Kleiman (SSTMS, Inc.)
I believe that the basic assumption that you have to put the database into a quiescent state to get a consistent backup is incorrect. I always thought that Firebird backups ran in a single long transaction meaning that nothing committed after the backup starts can be seen by the backup. Louis

Re: [firebird-support] Solution for a redundant join?

2012-10-24 Thread Louis Kleiman (SSTMS, Inc.)
Try using aliases: SELECT SCHEDULE.DATE_TIME, HOME_TEAM.TEAM as HomeTeamName, AWAY_TEAM.TEAM as AwayTeamName FROM SCHEDULE LEFT JOIN TEAMS HOME_TEAM ON SCHEDULE.HOME_TEAMID=HOME_TEAM.PRIMARYKEY LEFT JOIN TEAMS AWAY_TEAM ON SCHEDULE.AWAY_TEAMID=AWAY_TEAM.PRIMARYKEY On Wed, Oct 24,

Re: [firebird-support] How do you 0/null results to a GROUP BY query

2012-10-24 Thread Louis Kleiman (SSTMS, Inc.)
But this won't return rows for dates where there is no record in the source table. On Wed, Oct 24, 2012 at 6:02 PM, Leyne, Sean s...@broadviewsoftware.comwrote: ** I have query which extract the sales per day from a table Select EXTRACT(YEAR from DT) as YEARNO, EXTRACT(YEARDAY from DT)