zoukankan      html  css  js  c++  java
  • Caching and Indexing

    Dynamics AX has a data caching framework on the client that can help you greatly reduce the number of times the client goes to the server. In previous releases of Dynamics AX, this cache operated only on primary keys. In Dynamics AX 2009, this cache has been moved and now operates across all the unique keys in a table. Therefore, if a piece of code is accessing data from the client, the code should use a unique key if possible. Also, you need to ensure that all keys that are unique are marked as such in the Application Object Tree (AOT). You can use the Best Practices tool to ensure that all your tables have a primary key. Properly setting the CacheLookup property is a prerequisite for using the cache on the client. Table 12-1 shows the values that CacheLookup can have.  Definitions such as below:

    CacheLookup (Found,NotInTTS,FoundAndEmpty,EntireTable,None)

    Cache Setting(bold red)         Description(blue)

    Found                   

    If a table is accessed by a primary key or a unique index, the value is cached for the duration of the session or until the record is updated. If another AOS updates this record, all AOS will flush their cache. This cache setting is appropriate for master data.

    NotInTTS              

    Same as Found except every time a transaction is started, the cache is flushed and the query goes to the database. This cache setting is appropriate for transactional tables.

    FoundAndEmpty   

    Same as Found except if the query fails to find a record, the absence of the record is stored. This cache setting is appropriate for region specific master data or master data that isn’t always present.

    EntireTable           

    The entire table is cached in memory on the AOS, and the client treats this cache as “Found.” This cache setting is appropriate for tables with a known number of limited records, such as parameter tables.

    None                     

    No caching occurs. This setting is appropriate in only a few cases, such as when optimistic concurrency control has to be disabled.

     

    When caching is set, the client stores up to 100 records per table, and the AOS stores up to 2000 records per table. Index caching works only if the where clause has column names that are unique. In other words, caching won’t work if a join is present, if the query is a cross-company query, or if any range operations are in the query. Therefore, if you’re checking whether a query record that has a particular primary key and some other attribute exists, search the database only by primary key. For an example of this, refer to xDataArea.isVirtualCompany.

  • 相关阅读:
    第三次作业--团队展示(团队)
    第二次作业——个人项目实战
    软件工程实践2017第一次作业-准备
    Calculator PartⅢ
    C++课堂作业2016.05.04
    Masonry 等间隔或等宽高排列多个控件
    iOS绘图框架CoreGraphics分析
    UINavigationControlle 之 UINavigationBar及navigationItem关系探讨
    iOS
    iOS-加载数据的实现-MJRefresh
  • 原文地址:https://www.cnblogs.com/Fandyx/p/2103018.html
Copyright © 2011-2022 走看看