HiI want to create a index to improve a query like that:    SELECT * FROM 
MYTABLE  WHERE EXTRACT(YEAR FROM datein)=2019  AND EXTRACT(MONTH FROM datein)=1

I can create this index:   CREATE DESCENDING MYINDEX ON MYTABLE  COMPUTED BY 
(EXTRACT(YEAR FROM datein) || EXTRACT(MONTH FROM datein) )
 and change the query:
   SELECT * FROM MYTABLE  WHERE EXTRACT(YEAR FROM datein)|| EXTRACT(MONTH FROM 
datein)='20191'

index is used,but don't think this is the solution


thanks for any help
  • [firebird-support... 'Mr. John' mr_joh...@yahoo.com [firebird-support]
    • Re: [firebir... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
      • Re: [fir... 'Mr. John' mr_joh...@yahoo.com [firebird-support]

Reply via email to