Za i protiv lookup fields.
5 отговора
143 прегледа
Za i protiv lookup fields.
Zdraveite
Interesuva me dali ako izpolzvam lookup fields nqma da zabavq rabotata na porgramata prekaleno mnogo. Razbrax 4e ima podoben problem s iz4islimite poleta.
Blagodarq Predvaritelno
Interesuva me dali ako izpolzvam lookup fields nqma da zabavq rabotata na porgramata prekaleno mnogo. Razbrax 4e ima podoben problem s iz4islimite poleta.
Blagodarq Predvaritelno
Re: Za i protiv lookup fields.
Това си има своите предимства и недостатъци - но мога да ти кажа, че понякога не е възможно без тях, а скоростта много зависи от проектирането и подбора на базата данни - както и от компонентите за връзка които използваш.
Така, че прецизно използвай възможностите които са ти дадени - приемерно - ако имаш да правиш избор в таблица от пове4е от 1000 елемента - естествено е да не я показваш на един път. Между другото - има си кеширане на данните - което доста помага за подобряване на скоростта на look-up полетата.
---
Е т'ва е живот!
Така, че прецизно използвай възможностите които са ти дадени - приемерно - ако имаш да правиш избор в таблица от пове4е от 1000 елемента - естествено е да не я показваш на един път. Между другото - има си кеширане на данните - което доста помага за подобряване на скоростта на look-up полетата.
---
Е т'ва е живот!
Re: Za i protiv lookup fields.
Ако не те мързи защо не напишеш как една таблица се показва не на един път и това за кеширането.
Re: Za i protiv lookup fields.
Това за показването - не разбрах какво точно искаш да знаеш - имах предвид да се ограничава коли4еството на показваната информация
А за look-up кеширането - 4ети малко хелпа де
----------------------------------------------------
Determines whether the values of a lookup field are cached or looked up dynamically every time the current record in the dataset changes.
Delphi syntax:
property LookupCache: Boolean;
C++ syntax:
__property bool LookupCache = {read=FLookupCache, write=SetLookupCache, default=0};
Description
Set LookupCache to true to cache the values of a lookup field when the LookupDataSet is unlikely to change and the number of distinct lookup values is small. Caching lookup values can speed performance, because the lookup values for every set of LookupKeyFields values are preloaded when the DataSet is opened. When the current record in the DataSet changes, the field object can locate its Value in the cache, rather than accessing the LookupDataSet. This performance improvement is especially dramatic if the LookupDataSet is on a network where access is slow.
If every record of DataSet has different values for KeyFields, the overhead of locating values in the cache can be greater than any performance benefit provided by the cache. The overhead of locating values in the cache increases with the number of distinct values that can be taken by KeyFields.
If LookupDataSet is volatile, caching lookup values can lead to inaccurate results. Call RefreshLookupList to update the values in the lookup cache. RefreshLookupList regenerates the LookupList property, which contains the value of the LookupResultField for every set of LookupKeyFields values.
When setting LookupCache at runtime, call RefreshLookupList to initialize the cache.
Note: LookupCache is only meaningful if the value of FieldKind is fkLookup.
---
Е т'ва е живот!
А за look-up кеширането - 4ети малко хелпа де
----------------------------------------------------
Determines whether the values of a lookup field are cached or looked up dynamically every time the current record in the dataset changes.
Delphi syntax:
property LookupCache: Boolean;
C++ syntax:
__property bool LookupCache = {read=FLookupCache, write=SetLookupCache, default=0};
Description
Set LookupCache to true to cache the values of a lookup field when the LookupDataSet is unlikely to change and the number of distinct lookup values is small. Caching lookup values can speed performance, because the lookup values for every set of LookupKeyFields values are preloaded when the DataSet is opened. When the current record in the DataSet changes, the field object can locate its Value in the cache, rather than accessing the LookupDataSet. This performance improvement is especially dramatic if the LookupDataSet is on a network where access is slow.
If every record of DataSet has different values for KeyFields, the overhead of locating values in the cache can be greater than any performance benefit provided by the cache. The overhead of locating values in the cache increases with the number of distinct values that can be taken by KeyFields.
If LookupDataSet is volatile, caching lookup values can lead to inaccurate results. Call RefreshLookupList to update the values in the lookup cache. RefreshLookupList regenerates the LookupList property, which contains the value of the LookupResultField for every set of LookupKeyFields values.
When setting LookupCache at runtime, call RefreshLookupList to initialize the cache.
Note: LookupCache is only meaningful if the value of FieldKind is fkLookup.
---
Е т'ва е живот!
Re: Za i protiv lookup fields.
аз пък си помислих че част от таблицата се чете в някакъв буфер и тази част се зарежда в някаква грид и после в зависимост от придвижването на юсера се зарежда някоя друга част от таблицата -както и да е...
Re: Za i protiv lookup fields.
Ами точно така де - само 4е това не важи при компонентите за BDE (стандартните с които се работи) - подобно кеширане има при SQL сървърите (стига грида да е написан както трябва - а "стандартния" май не е ). Проблема на подобен начин на работа е, че DB enginе-a трябва да го поддържа - не очаквай от BDE + Paradox да работи така ;-)))
---
Е т'ва е живот!
---
Е т'ва е живот!