Acumatica 执行查询需要时间

Acumatica 执行查询需要时间,acumatica,Acumatica,我有一个关于Inventoryitem的扩展表,它有100个字段。我编写了一个智能搜索,根据过滤条件显示数据 具有25.000条以上记录的物料主数据 获取所有记录大约需要3分钟 public PXSelectOrderBy< FilterResult, OrderBy< Asc<FilterResult.inventoryID, Asc<FilterResult.recordType>

我有一个关于Inventoryitem的扩展表,它有100个字段。我编写了一个智能搜索,根据过滤条件显示数据

具有25.000条以上记录的物料主数据

获取所有记录大约需要3分钟

public PXSelectOrderBy<
        FilterResult, 
        OrderBy<
            Asc<FilterResult.inventoryID, 
            Asc<FilterResult.recordType>>>> records;

[System.SerializableAttribute()]
[PXTable(typeof(InventoryItem.inventoryID),
   IsOptional = true)]
public class ItemExtendTable : PXCacheExtension<InventoryItem>
{

 }



[PXFilterable]
    public PXSelectJoinGroupBy<
        INSiteStatus, 
        LeftJoin<InventoryItem, 
            On<InventoryItem.inventoryID, Equal<INSiteStatus.inventoryID>>>, 
        Aggregate<
            GroupBy<InventoryItem.inventoryID, 
                Sum<INSiteStatus.qtyOnHand>>>> 
        item;
**

上述语句提取数据需要3分钟以上

使用扩展表对BQL查询有影响吗

更新


我已经运行了profile,它为每个项目激发SQL语句。它触发了超过25000条SQL语句。

我相信您偶然发现了为什么它们不能同时显示所有记录。请记住,它们在代码和SQL之间有一个层,用于将命令转换为SQL。这也需要时间。关于我的DAC问题,我在无界InventoryID字段中使用了[Inventory(Visibility=PXUIVisibility.SelectorVisible,DisplayName=“Inventory ID”,IsKey=true)]。Acumatica团队帮助解决了这个问题,我将其更改为简单的pxselector属性
protected virtual IEnumerable Records()
    {
        List<object> result = new List<object>();
        List<FilterResult> rows = new List<FilterResult>();
        PXView select = new PXView(this, true, item.View.BqlSelect);
        Int32 totalrow = 0;
        Int32 startrow = PXView.StartRow;
        result = select.Select(PXView.Currents, PXView.Parameters,
               PXView.Searches, PXView.SortColumns, PXView.Descendings,
               PXView.Filters, ref startrow, PXView.MaximumRows, ref totalrow);
        PXView.StartRow = 0;

        foreach (PXResult<INSiteStatus, InventoryItem> res in result)
        {
            InventoryItem item_rec = res;
            ItemExtendTable item_ext = PXCache<InventoryItem>.GetExtension<ItemExtendTable>(item_rec);
            FilterResult ret = new FilterResult();

            // Fill values
            rows.Add(ret);
        }
        return rows;
    }
result = select.Select(PXView.Currents, PXView.Parameters,
                       PXView.Searches, PXView.SortColumns, PXView.Descendings,
                       PXView.Filters, ref startrow, PXView.MaximumRows, ref totalrow);