TZConnection.UseMetadata & TZQuery.ReadOnly

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
jaco
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 03.06.2015, 10:15

TZConnection.UseMetadata & TZQuery.ReadOnly

Post by jaco »

Hi.

Does time of query execution depend on values of these properties?

I have a weird problem. When values of these properties are default (UseMetadata = true, ReadOnly = false) some select takes about 20 s. When I change TZQuery.ReadOnly to true, the same select takes about 200 ms. More, this problem appears only in the case of remote databse. When databse is local value of ReadOnly has no influence on time. Can you explain such behavior?

Have UseMetadata and ReadOnly any relationshi[? Does UseMetadata have an impact on time of query execution?

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

Re: TZConnection.UseMetadata & TZQuery.ReadOnly

Post by marsupilami »

Hello jaco,

that greatly depends on the database you use. I can tell you that for postgres things can get slower when you have readonly = false because in that case the driver sometimes queries additional information from the database to construct the updateable result set. So on a remote database there may be a noteable difference.

There could be another effect too. Using Firebird as an example it might not only be the case that there are more quieries to execute if an updateable dataset has to be constructed but also these datasets might be bigger than the one you requested originally. With Firebird transferring result sets that have a lot of rows (possibly a list of table columns) can take quite some time because it seems that Firebird and possibly also Interbase transfer somethi9n like one row or only a couple of rows per round trip between the server an the client. In a scenario like this asking the database to return one row might be fast. But asking the database to return 1000 rows possibly can take some time because 1000 round trips between the server and the client may be needed and ping times will have more of an impact on this than bandwidth...

These are only two things that I encountered. Depending on the database you use and your setup other things also might have an impact...

With best regards,

Jan
Post Reply