1
Hello, I have an application in Delphi that does the following: Make a query in the Postgresql database using the Zeos Tzquery/Tzconnection components, then scroll through the result and save it in another table, table with columns identical to the columns generated from the previous query.
It works, however, the amount of records is very large and going through all these records 1 to 1 takes a long time. Here I decided to divide this work of going through Dataset using threads, but I stopped in a problem that is the following:
I can’t create new table instances (Dataset), so I can’t work the parallelism. Someone has an idea of how to solve this?
Excerpt from how I am running and how I tried to run respectively:
qry := TZQuery.Create(nil);
qry := DM.Qry_Levantamento;
--------------
qry := TZQuery.Create(nil);
qry.Assign(DM.Qry_Levantamento);
I also thought about doing all this by Query, but I haven’t taken it any further because I don’t know if I can apply this SQL parallelism. Thank you!
It worked much better than I expected, always good to ask for advice after hitting head atoa... Thank you very much!
– Rafael Araujo