[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Compare SQL query with ABL query, usage of the indexes

Status
Not open for further replies.
M

makthar

Guest
Hi Stefan, Clearly, SQL optimizer should have used index of field1, if it reduces number of DB reads. I see following two possibilities on why it did not pick that index. 1. Once we execute a query, the query plan (access path) will cached, so even after updating statistics, SQL might be using cached plan. In order for SQL to use new plan (based on statistics), we need to re-connect and run the query again. 2. There could be a bug in SQL optimizer, due to which it picked non-efficient index. If above point #1 is not the reason, then, It would be appreciated (if possible), if you can share data definition (.df) and data (.d) for the above mentioned table. This might help us in understanding the issue and improve SQL access. And on which version of OE that these queries are being exercised? Thanks, Akthar.

Continue reading...
 
Status
Not open for further replies.
Top