-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ODBC driver not properly paging #16
Comments
Any news? Any solution for this issue? How can we get all results, e.g., for a PowerBI dashboard? |
Hi @dratasich @andybeaulieu, I tested ODBC driver with a sample application and it supports pagination/cursor. |
@dratasich @andybeaulieu, |
Thanks @Yury-Fridlyand - we will try and come back to you! |
Describe the bug
When using the ODBC driver from some SQL clients, only the first 200 rows are retrieved by default. Normally we would use a "LIMIT" clause to get more than 200 rows, but LIMIT is not supported by all SQL clients. We can manually increase the cluster opendistro.query.size_limit and the index.max_result_window settings, but this has significant memory overhead.
Can the ODBC driver support an efficient paging mechanism for these?
To Reproduce
Steps to reproduce the behavior:
In SQL Server (or a different SQL client tool), add a linked server to the OpenSearch ODBC DSN:
EXEC sp_addlinkedserver
@server = N'OpenSearch',
@srvproduct = N'',
@Provider = N'MSDASQL',
@datasrc = N'OpenSearch SQL ODBC DSN';
try to query the Linked Server using SQL (ensure the OpenSearch index has more than 200 rows)
select top 1000 * from [OpenSearch]...[myopensearchindex]
What happens
only the first 200 rows are retrieved. We can force more rows by changing the cluster's opendistro.query.size_limit and each index's index.max_result_window --- but that is not optimal for memory.
Expected behavior
The ODBC driver should implement proper paging to get the data down to the client. Maybe it could honor the T-SQL "top" syntax instead of a "LIMIT" clause?
The text was updated successfully, but these errors were encountered: