Subject | Re: [firebird-support] Help creating expression index |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2019-07-17T15:59:22Z |
17.07.2019 17:54, 'Mr. John' mr_johnmr@... [firebird-support] wrote:
SELECT * FROM MYTABLE WHERE datein between date '2019-01-01' and date '2019-02-01'
Then you can create an ordinary index for datein.
--
WBR, SD.
> I want to create a index to improve a query like that:Rewrite it as
> SELECT * FROM MYTABLE WHERE EXTRACT(YEAR FROM datein)=2019 AND EXTRACT(MONTH FROM
> datein)=1
SELECT * FROM MYTABLE WHERE datein between date '2019-01-01' and date '2019-02-01'
Then you can create an ordinary index for datein.
--
WBR, SD.