why is the result of my fetch not complete in database?

1 回表示 (過去 30 日間)
Aubai
Aubai 2016 年 11 月 29 日
コメント済み: Aubai 2017 年 1 月 17 日
I am trying to load some data from a database using matlab. for that i have written my SQL-query and connected to my database and so on.
when asking for the number of raws obtained from the selected search SQL-Query (Using the SELECT COUNT(*) query) i am getting num_rows = 63591 which is correct and i do expect. yet when afterword i use the 'exec-function' to the same SQL-search query, followed by the 'fetch-function' i am not getting the expected number of rows given by num_raws.
can anyone help me out here? what am I doning wrong?
Best Regards
  2 件のコメント
Sanjana Ramakrishnan
Sanjana Ramakrishnan 2016 年 12 月 12 日
Since the size of the dataset is huge, 'fetch' command may not have retrieved all the rows. This can be resolved by setting database preferences, to fetch large dataset as below:
1. Execute the below automate fetching in batches for large datasets: >>setdbprefs('FetchInBatches','yes')
2. Execute the below command to import data in batches of size '1000' >>setdbprefs('FetchInBatches','1000')
The above commands would enable importing of large datasets in batches of 1000.
Please refer the below links for more information
Aubai
Aubai 2017 年 1 月 17 日
Thx Very much that did help and sorry for the late replay.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by