TMyEmbConnection and FetchAll=false

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
easyblue
Posts: 64
Joined: Wed 02 Feb 2005 13:02
Location: Shanghai

TMyEmbConnection and FetchAll=false

Post by easyblue » Tue 18 Jan 2011 13:58

Hello

MyDAC v6.00.0.3+BDS2006+MySQL server version: 4.1.20-pro-embedded-log

I have met a very strange problem.

I have a huge table to be displayed in Grid. Naturally I set FetchAll=false as

Code: Select all

  MyEmbConnection1->Connect();
  MyEmbConnection1->Database="test";
  MyQuery1->FetchAll =false;
  MyQuery1->SQL->Text="select * from huge_table";
  MyQuery1->Execute();
And then I found that it seems FetchAll has no effect, memory are eaten up very quickly, it increase from 0.99G to 2.23G, and when I scroll the TCRDBGrid, the mouse does not change, which imply to me that actually all data are already fetched.

Then I made a test to switch from TMyEmbConnection into a TMyConnection, then FetchAll=false works correctly:
1. there is very slight memory increase
2. and when I scroll down the grid, mouse change into the "SQL" mode, indicating that it is fetching remaining data from server.

Can you please check it asap, since I need to handle a even larger huge table asap.

AndreyZ

Post by AndreyZ » Wed 19 Jan 2011 13:45

Hello,

This is a specificity of the MySQL Embedded Server work. Embedded server returns all data and loads it into the memory. We cannot influence such behaviour.

Post Reply