We have the options for SQL History set as in the attached screenshot. When these options are in place, the 1st query executed in a query window takes a very long time if the SQL History and/or Archive is very large. We previously forced a limit of SQL History size of 1000. But if a user somehow gets "-1" in there, then the limit is probably not applied.
Take a look at History.java, HistoryToolbar.java & DatastudioOptionsObjects.general_history_maxnumofentriesinsqlhist
|
5 KB
![]() |
525 KB
@jenny: pls investigate. I'm able to enter values of -1, or 20000 for SQL History -- there seems to be no enforcement of "1000" in our UI. The only UI enforcement I see is "value must be an integer." Pls see if we ever had 1000 limit enforcement in place in earlier versions.
I am allowed to set the value to "-1" in both the File->Options and in the SQL History toolbar.
For each query execution, ADS stores 2 files in the /.datastudio/history folder. I executed "select 1" 1100 times and 2200 files were created. This means that the 1000 limit was surpased. I've attached my history folder as history.zip
I am allowed to set the value to "-1" in both the File->Options and in the SQL History toolbar.
For each query execution, ADS stores 2 files in the /.datastudio/history folder. I executed "select 1" 1100 times and 2200 files were created. This means that the 1000 limit was surpased. I've attached my history folder as history.zip
In File->Options if you enter a value greater then 1000, it will take the value in the UI, but set the internal option to 1000. When you restart, it will reset the value to 1000. The problem seems to be when you set the value to "-1". I am creating a large history to see how it effects execution of the first query execution.
In File->Options if you enter a value greater then 1000, it will take the value in the UI, but set the internal option to 1000. When you restart, it will reset the value to 1000. The problem seems to be when you set the value to "-1". I am creating a large history to see how it effects execution of the first query execution.
I placed history-8000.zip on file server. With this you can reproduce the initial query of "SELECT 1" taking about 7seconds. The slowness is in History.loadFilesFromDisk(). But the problem revolves around History.getMaxHistory(). If we add a condition so that if the value is -1, we return 1000, then that will cap history to 1000 and the history will be truncated with the next execution.
I placed history-8000.zip on file server. With this you can reproduce the initial query of "SELECT 1" taking about 7seconds. The slowness is in History.loadFilesFromDisk(). But the problem revolves around History.getMaxHistory(). If we add a condition so that if the value is -1, we return 1000, then that will cap history to 1000 and the history will be truncated with the next execution.
We should add a condition statement, where if the MAX value is less then 0 (zero), then return the value of 1000. We should add this to History.getMaxHistory() and DatastudioOptionsObjects.general_history_maxnumofentriesinsqlhist
We should add a condition statement, where if the MAX value is less then 0 (zero), then return the value of 1000. We should add this to History.getMaxHistory() and DatastudioOptionsObjects.general_history_maxnumofentriesinsqlhist
Issue #13762 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build ADS 16.0.8-4 |
No time estimate |
@jenny: pls investigate. I'm able to enter values of -1, or 20000 for SQL History -- there seems to be no enforcement of "1000" in our UI. The only UI enforcement I see is "value must be an integer." Pls see if we ever had 1000 limit enforcement in place in earlier versions.