Load database into memory

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 1023
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Load database into memory

Post by Grovkillen » Mon Feb 10, 2014 8:27 am

Hi,

I'm not sure if this is possible but I have read something about Delphi is possible of loading a database table into the memory = speeding up the reuse of the data without the need to constantly do database queries. It's called "TFDMemTable".

Is this possible to have in MS? My use would be to have approx. 80 000 calculations pre-made and have these loaded into the memory for super fast access. Today I have to poll the user input and then do a query of those inputs which is not really on the fly...

I hope I make sense and that I'm understod. Thanks for reading.
Let>ME=%Script%

Running: 15.0.24
version history

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Feb 10, 2014 3:29 pm

DBQuery already returns the recordset to memory.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Grovkillen
Automation Wizard
Posts: 1023
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Post by Grovkillen » Thu Feb 13, 2014 9:33 am

Thanks for the feedback Marcus and sorry for asking this but:

Would I be able to do a QBquery of the data in the memory? My issue is that I have a database of some 80 000 pre-made-calculations (pretty advanced calculations that take some CPU = time to complete) and I can then do a query of the input variables and get the result without the need of doing the actual calculations. Anyhow these pre-made-calculations rarely change and thus it's no problem to have the entire database in written to memory on startup of the script/exe/app. But I need to be able to use the data in the memory... I hope I make sense... Sorry for not being super clear on what I want but I'm new to the DBquery thing and at the moment at home with my 1-year old.

Thanks for your time!
Let>ME=%Script%

Running: 15.0.24
version history

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Feb 17, 2014 9:05 pm

DBQuery uses ADO/ODBC drivers. How each and every database driver works I cannot possibly say. I would have thought they do most of their work in memory. Usually the DB is on a networked server, so I suppose there wouldn't normally be any disk IO.

Once the recordset is loaded the data is in memory as an array in MacroScript.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts