ZSQLProcessor paramcheck

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
mparak
Senior Boarder
Senior Boarder
Posts: 81
Joined: 12.09.2005, 06:51
Location: Durban South Africa
Contact:

ZSQLProcessor paramcheck

Post 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
Mohammed Parak
CAD RETAIL
Durban South Africa
http://www.cad.co.za
mparak
Senior Boarder
Senior Boarder
Posts: 81
Joined: 12.09.2005, 06:51
Location: Durban South Africa
Contact:

Post 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.
Mohammed Parak
CAD RETAIL
Durban South Africa
http://www.cad.co.za
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post by seawolf »

A simple solution coulb be using AssingFile, Readln functions
The problem you noted is a Delphi common problem
marcov
Senior Boarder
Senior Boarder
Posts: 95
Joined: 24.06.2010, 09:17

Post 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.
mparak
Senior Boarder
Senior Boarder
Posts: 81
Joined: 12.09.2005, 06:51
Location: Durban South Africa
Contact:

Post 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
Mohammed Parak
CAD RETAIL
Durban South Africa
http://www.cad.co.za
Post Reply