Brian D. Warner
Brian D. Warner

Reputation: 11

Large SQLIite Tables and Memory Use

System:

I have a FireDAC TfdTable on a data module that accesses a large table (about 750 MB). When I do Table.Open while watching the Task Manager memory report, it looks like the entire table is being loaded into memory instead of a small subset (usage goes from about 24 MB to 1.1 GB).

Referring to the Delphi docs about Live Data, I have the Fetch options set per the recommendations and have a unique key on the table, though its name is not "PRIMARY" but it is the selected index when opening the table.

Fetch Options:

Am I wrong to expect otherwise? If not, any suggestions on how to reduce memory use?

Thanks Brian

Upvotes: 1

Views: 341

Answers (1)

A.K.D.
A.K.D.

Reputation: 90

Add a primary key to your table and your problem will be solved.

Upvotes: 0

Related Questions