I'm trying to query 4D Server via the SQL engine from another application, and it seems like if you use CURRENT_DATE() or CURDATE(), the query is always sequential even if an index is available.
Example: SELECT InvoiceID from Invoices WHERE CreatedDate=CURRENT_DATE() ... does a sequential scan of the Invoices table, even though Invoices.CreatedData is indexed. This takes a very long time - probably close to a half an hour. If I rewrite the where clause as: WHERE CreatedDate='2018-11-30' ... it takes milliseconds. Is there a trick to being able to write a script that can generically select against the current date? This is from some php code, fyi... but it's easily reproduced inside of 4D itself. Thanks! Jeff ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

