Reduce time to open database
Moderators: gto, cipto_kh, EgonHugeist
Reduce time to open database
Hello. Somebody can help me to reduce the time needed to open a large database?
I know if a set Filtered to True this help.
Disable calc Fields? Lookup fields take much time?
Something else?
Thanks.
I know if a set Filtered to True this help.
Disable calc Fields? Lookup fields take much time?
Something else?
Thanks.
-
- Fresh Boarder
- Posts: 20
- Joined: 24.08.2005, 08:50
Ops. Sorry.swierzbicki wrote:Please be more precise.
What Database are you running ? , you can compress the data when running on MySQL.
How optimized is your SQL Query ?
I'm using Postgres. I'm using a TZTable. I need all the data for each row, but I need just one row each time. I need navigation(next, prior).
Use a ZQuery
Set Filtered = True
CalcFields are complex as your procedure OnCalcFields. If you can, try to don't use it. If you have a field called total which receive the result from an operation with the fields in same row, use SQL to do it. It's quite more quick.
LookupFields are slow, too. Mostly lookup fields can be rewrited on SQL using joins.
Well, if you can post details about your query (table name, fields in question, etc..) we may help
[]'s
Set Filtered = True
CalcFields are complex as your procedure OnCalcFields. If you can, try to don't use it. If you have a field called total which receive the result from an operation with the fields in same row, use SQL to do it. It's quite more quick.
LookupFields are slow, too. Mostly lookup fields can be rewrited on SQL using joins.
Well, if you can post details about your query (table name, fields in question, etc..) we may help
[]'s
The lookup fields use data in memory. I can't use SQL for them. The question is: Lookup is more slow than calc fields?
A Zquery with "select * from table" is more fast than a Ztable?
The table in question is customers. Have 6000 rows.
And I have another table with some extra data, like a master-detail. But the relation is 1-1.
Thanks.
A Zquery with "select * from table" is more fast than a Ztable?
The table in question is customers. Have 6000 rows.
And I have another table with some extra data, like a master-detail. But the relation is 1-1.
Thanks.
Well, lookups and calculated fields are quite different. Calc fields are complex as the commands that OnCalcFields procedure holds. If it's a simple "field receive field", it will be almost transparent on speed. But I have already seen a HUGE procedure, reading values from ini files, doing locates and creating objects into OnCalcFields. And yes, it was drammatically slow.leodinei wrote:The lookup fields use data in memory. I can't use SQL for them. The question is: Lookup is more slow than calc fields?
A Zquery with "select * from table" is more fast than a Ztable?
The table in question is customers. Have 6000 rows.
And I have another table with some extra data, like a master-detail. But the relation is 1-1.
Thanks.
Lookups are not *so* slow. You may take lookups as a filed that search for it's value on another table. Think in something like a locate, unsing the keyfield, into the lookup dataset. If the field you are looking for is indexed, that looukup may be very fast. And if depends on text search or non indexed fields, it may be very slow. Each case is a case on lookups. Less is better, always.
ZQuery with "select * from" and ZTable will be almost the same thing. The trick is that with query you can only select the fields that you will use, or the big trick, use keywords to improve the results. Almost all lookups (data -> data, not in memory) can be replaced by a join clause, with a big performance result.
6000 rows is VERY small. Tables with 150.000+ rows open almost instantly here. How many time your takes to be opened?
If you can post some code/example, or if it's part from a big project, isolate that case, and post something, then we may help you better
Sorry for the delay.
So I have some great problem.
I think the problem is with the network or database config.
My table with 6000 rows take > 30s to load in the network.
My idea: with I have a table with the key and another in master-detail with all the data. When a navigate in the master, the detail will load the new data? So I have just on big record in the memory?
Thanks
So I have some great problem.
I think the problem is with the network or database config.
My table with 6000 rows take > 30s to load in the network.
My idea: with I have a table with the key and another in master-detail with all the data. When a navigate in the master, the detail will load the new data? So I have just on big record in the memory?
Thanks