Page 1 of 1

ZSQLProcessor paramcheck

Posted: 02.02.2012, 12:39
by mparak
Hi guys,
I often use the ZSQLProcessor thingy to run multiple SQL queries against a MySQL server in one go. It usually runs beautifully.
More recently I needed to execute a HUGE SQL script.
When loading the ZSQLProcessor1.script:=something the system appears to hang. I think maybe it is screening each line before it loads it. Will turning off the paramcheck speed up the process? What exactly is the paramcheck. ?
Please advise.
M

Posted: 02.02.2012, 12:52
by mparak
Basically how can I get the ZSQLProcessor to load the huge query quickly.
The script.loadfromfile() is too slow.
Once the SQL is loaded into the script the execution time is very acceptable.

Posted: 04.02.2012, 19:11
by seawolf
A simple solution coulb be using AssingFile, Readln functions
The problem you noted is a Delphi common problem

Posted: 13.02.2012, 22:01
by marcov
Stringlist is not the most optimal, but I don't assume his SQL is tens of megabytes ?

Note that it is worth writing a test for, then sb can try to optimize it.

Posted: 15.02.2012, 12:59
by mparak
Hi Guys,
The answer was actually quite easy.
We all acknowledge the problem that Delphi has loading LARGE text files and this has a workaround. I am now able to load a SQL script file that is tens of megs with thousands of SQL commands, in seconds.
If anyone needs the workaround, drop me mail.
Live long and Prosper.
Mo