In the MariaDB driver (MariaDB.int) there is a field `Default_Max_Rows 10`, I expect this to add a LIMIT 10 on all queries. Is that would it should do or is it something client side?


The issue is we are having a table load really slow, because it's loading all the records. There is no constraints and the indexes are setup correctly. Using the Mariadb slow log I identified the following.


Code:
# Time: 220608 23:28:37
# User@Host: root[root] @ localhost [::1]
# Thread_id: 10  Schema: xxx  QC_hit: No
# Query_time: 8.340074  Lock_time: 0.000024  Rows_sent: 1271726  Rows_examined: 2543452
# Rows_affected: 0  Bytes_sent: 330743808

I then turned on the general_log which logs all queries. It shows it was loading without a limit.


I then did the following in the DD of the offending table
Code:
Get_Attribute DF_FILE_MAX_ROWS_FETCHED of (RefTable(ORD_HEAD)) to iCurrent
Set_Attribute DF_FILE_MAX_ROWS_FETCHED of (RefTable(ORD_HEAD)) to 10

iCurrent is 0. Once set to 10 it has a LIMIT 10 in the SQL queries within the log, and loads as fast as I would expect.


The documentation for Default_Max_Rows says: "The default setting for the DF_FILE_MAX_ROWS_FETCHED attribute when creating new tables in a structure operation.". So I could read that, as, only when CREATING a table. But going further into DF_FILE_MAX_ROWS_FETCHED it goes to DF_DATABASE_DEFAULT_MAX_ROWS which then goes to DF_FILE_MAX_ROWS_FETCHED where it says: "The number of records, result sets of find operations on this table should be limited to. The default value is 0 (zero), which means that result sets will not be limited. All other positive integer values will limit the result set to that value."


https://docs.dataaccess.com/dataflex...fault_Max_Rows
https://docs.dataaccess.com/dataflex...T_MAX_ROWS.htm
https://docs.dataaccess.com/dataflex...WS_FETCHED.htm


So basically, is the documentation saying this only sets the default for when creating, and then it's 0 when all finds happen. Or, is this meant to be the default all the time. And if not, can anyone else confirm they are experiencing this?


Thanks,