Adding persistantfields on TzTable not responding

The forum for ZeosLib 7.2 Report problems. Ask for help, post proposals for the new version and Zeoslib 7.2 features here. This is a forum that will be edited once the 7.2.x version goes into RC/stable!!

My personal intention for 7.2 is to speed up the internals as optimal a possible for all IDE's. Hope you can help?! Have fun with testing 7.2
Post Reply
JWdeBokx
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 27.01.2021, 17:20

Adding persistantfields on TzTable not responding

Post by JWdeBokx »

Hello all,

After using zeos before, I have a new project to do with zeos.
So downloaded latest stable version 7.2.10 and installed it in Delphi 10.4.1.

I added a tztable and connection.
The table it refers to is filled with a lot of data, 2,500,000 records.
It seems when trying to add persistant fields it loads all the data.
This not only take a lot of time, but it eventualy stops with an error.

Tried to set filtered to true and filter to 1=0
Also option smartloading to true.

But nothing helps.

Is using a tzquery the only solution?
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Adding persistantfields on TzTable not responding

Post by marsupilami »

Hello,

a lot of things come to mind:
  • It depends on the driver you use. With some databases we have to wait until all records are transferred to the client PC.
  • If you start a new project, you might want to use Zeos 8.0. It is in beta state currently and will be released during the next months. We reduced the memory footprint quite much there. It also should work a lot faster than Zeos 7.2. So it most probably will give you a speedup. When we release Zeos 8.0, Zeos 7.2 will be deprecated...
  • Maybe it makes sense to not have persistent fields. I suggest to modify field properties in the AfterOpen event of TZQuery.
  • If you want to stick to persistent fields: Maybe it helps to add a condition like where 1=0 to your SQL. The Filter property in TZQuery only works when the data already is loaded into Zeos. Using where 1=0 keeps the server from sending the data but you will still get valid field definitions.
  • There is no difference between TZTable and a TZQuery where you do a 'select * from TableX'. TZTable does exactly the same thing internally.
Best regards,

Jan
JWdeBokx
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 27.01.2021, 17:20

Re: Adding persistantfields on TzTable not responding

Post by JWdeBokx »

Hello Jan, (My name is Jan too :lol: )

Thanks for the prompt reponse!

I forgot to mention.... I use MySQL.

I'm going to install 8.0 then. I'm at the start from the project so if stable release is within a few months it's not a problem.
If that version also get's all data for retreiving the fields, I'll use tzquery instead.

Thank you,

Jan
JWdeBokx
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 27.01.2021, 17:20

Re: Adding persistantfields on TzTable not responding

Post by JWdeBokx »

Hello Jan (My name is Jan too :lol: )

Typeing again, gateway time out during submit...

I forgot to mention in my first post, I'm using MySql.
I'll get version 8.0. I saw 7.3 mentioned, this is the same version?
And there is no download, so just pull the svn?

Well I suppose the use of TzQuery will solve this problem...

Thanks,

Jan
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Adding persistantfields on TzTable not responding

Post by marsupilami »

Hello Jan ;)

I seem to remember that MySQL is one of the databases where we have to wait for the whole recordset to be transferred from the server before we can start processing it.

Zeos 7.3 and 8.0 are the same. We decided to raise the major version number because it is a big update and we added a lot of functionality. Currently there are no downloads for Zeos 8.0. Just use the 8.0-testing branch from SVN or from the unofficial github mirror: https://github.com/marsupilami79/zeoslib.

If threre are problems feel free to ask or to open tickets on our bugtracker.

Best regards,

Jan
JWdeBokx
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 27.01.2021, 17:20

Re: Adding persistantfields on TzTable not responding

Post by JWdeBokx »

I have now the version 7.3 running.
The persistant field is indeed the same problem.
Performance seems better, so I will use these to develop now.

I'll let it know if somethings not working.
Post Reply