Today was the first day I got to play with the new analysis views in Business Central and I made a little experiment.
I Created a new table:
table 50100 "Large Table"
{
DataClassification = ToBeClassified;
fields
{
field(1; "Entry No."; Integer)
{
DataClassification = ToBeClassified;
AutoIncrement = true;
}
field(2; "Some Date"; Date)
{
DataClassification = CustomerContent;
}
field(3; "Some Amount"; Decimal)
{
DataClassification = CustomerContent;
}
}
keys
{
key(Key1; "Entry No.")
{
Clustered = true;
}
}
trigger OnInsert()
begin
end;
}
and a button to enter some random data into this table:
action(ActionName)
{
ApplicationArea = All;
Caption = 'Add 100000 items';
trigger OnAction()
var
ItemCountToAdd: Integer;
LargeTable: Record "Large Table";
I: Integer;
begin
ItemCountToAdd := 100000;
while I < ItemCountToAdd do begin
I += 1;
LargeTable.Init();
LargeTable."Entry No." := 0;
LargeTable.Validate("Some Date", Today - Random(345) + Random(312));
LargeTable.Validate("Some Amount", (40000 + Random(12000) - Random(8311)) * Random(1));
LargeTable.Insert();
end;
Message('Total Count is: ' + format(Rec.CountApprox));
end;
}
I wanted to test how quick the analysis view is when theres lots of data without indexes on the aggregations.
First I found out that there is a limit of 100k rows to analyse:
Ok lets add some filters:
Now the Pivot view is working great and I got results.
So how long it takes to analyse the max limit of 100k records?
This is how long it calculates 100k rows without any indexes on the aggregates. I think it takes around 10 seconds?
I think it is pretty fast. It is a simple example but I really like what possibilites this will give.
I wonder if we get the possibility to create custom analysis filters in the future? Would be good to be able to create custom date range or similar filters I guess.