SV: [firebird-support] index use when using order by

2019-09-23 Thread Mikkel Andersen mik...@cito.dk [firebird-support]
choosing between two evils. Best regards Mikkel Andersen Fra: firebird-support@yahoogroups.com Sendt: 18. september 2019 08:04 Til: firebird-support@yahoogroups.com Emne: Re: [firebird-support] index use when using order by On 2019-09-18 06:46, liviuslivius liviusliv...@poczta.onet.pl

RE: [firebird-support] index use when using order by

2019-09-18 Thread 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
-support@yahoogroups.com Subject: Re: [firebird-support] index use when using order by On 2019-09-18 06:46, liviuslivius liviusliv...@poczta.onet.pl [firebird-support] wrote: > Hi > > your problem is that you have ascending index, which is not usable in > descending queries. You ne

Re: [firebird-support] index use when using order by

2019-09-18 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2019-09-18 06:46, liviuslivius liviusliv...@poczta.onet.pl [firebird-support] wrote: > Hi > > your problem is that you have ascending index, which is not usable in > descending queries. You need to create descending index and it then > can be used in e.g. max queries. Ascending index is used

Re: [firebird-support] index use when using order by

2019-09-17 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 2019-09-18 02:11, 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support] wrote: > Firebird 2.5.7 (WI-2.5.7.27050) > > Just realised I 'should' be using 2.5.8, but on a server running > WI-V2.5.8.27089 it still uses NATURAL. Be aware, the latest version of Firebird 2.5 is 2.5.9, not

RE: [firebird-support] index use when using order by

2019-09-17 Thread 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
Subject: RE: [firebird-support] index use when using order by Hi your problem is that you have ascending index, which is not usable in descending queries. You need to create descending index and it then can be used in e.g. max queries. Ascending index is used in min queries and order by xx asc

RE: [firebird-support] index use when using order by

2019-09-17 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Hiyour problem is that you have ascending index, which is not usable in descending queries. You need to create descending index and it then can be used in e.g. max queries. Ascending index is used in min queries and order by xx asc.Regards,Karol Bieniaszewski null

RE: [firebird-support] index use when using order by

2019-09-17 Thread 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
reads, 0 writes. 0 inserts, 0 updates, 0 deletes, 4 index, 0 seq. Delta memory: 20548 bytes. Total execution time: 0.031s Script execution finished. Cheers, Andrew Zenz From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroup

RE: [firebird-support] index use when using order by

2019-09-17 Thread 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
00 secs HTH Andrew Zenz From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Sent: Wednesday, 18 September 2019 10:11 AM To: firebird-support@yahoogroups.com Subject: [firebird-support] index use when using order by Hi ev

[firebird-support] index use when using order by

2019-09-17 Thread 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
Hi everyone. I am experiencing an unusual situation. I have a log table for tracking user changes to records. Table is as follows: CREATE TABLE AIMLOG ( ID Integer NOT NULL, USERNAME Char(12) COLLATE EN_UK, USERNO Integer, LOGDATE Integer, LOGTIME Integer, LOGTABLE