15
Views
8
Comments
I want to create tool to check speed of data inserting
Question
Application Type
Reactive

I want to check time speed when inserting with Entity action

I want to check time speed when inserting with advanced SQL

UserImage.jpg
Nino Gachechiladze

You can make a logging with data included datetime right before execution and instantly after execution and It will be the closest to accurate.

2026-03-12 06-20-48
KUNDAN CHAUHAN
Champion

Hi @Dilmi Amar ,

We can use this simple step for achieve this,

1.Create Local Variables: StartTime(DateTime), EndTime(DateTime), TotalTime (Integer=>milliseconds ), RecordCount(Integer=>number of inserted records ), Speed(Decimal =>records per second )

2.Before Insert Block: StartTime = CurrDateTime()

3.Perform Insert (inside loop or Advanced SQL) 

4.After Insert Block: 

EndTime = CurrDateTime()

TotalTime = DateDiffMilliseconds(StartTime, EndTime)

Speed = RecordCount * 1000 / TotalTime


Now we have output: 

  • TotalTime: how long it took (in ms)

  • Speed: how many records per second were inserted


Thanks


UserImage.jpg
Dilmi Amar

Hi @KUNDAN CHAUHAN 

why use *1000

Icanot found DateDiffMilliseconds 

is it equal to Diffseconds()


2026-03-12 06-20-48
KUNDAN CHAUHAN
Champion


1.why use *1000 => just for convert milliseconds into second for "records per second" 
2.I cannot found DateDiffMilliseconds : no worry just use "DiffSeconds", then output result in second if you want result in milliseconds then multiply by 1000

Use this:

EndTime = CurrDateTime()

TotalTime = DiffSeconds(StartTime, EndTime) - Output result in second

Speed = RecordCount / TotalTime - Output result in record per second 





UserImage.jpg
Dilmi Amar
CheckSpeed.oml
2026-03-12 06-20-48
KUNDAN CHAUHAN
Champion

@Dilmi Amar ,

In which step Error is appearing or any error log.

2019-11-11 17-10-24
Manish Jawla
 
MVP

Hi @Dilmi Amar ,

can you please elaborate your use case here?

If you would like to compare the speed then against how many records?

Do you have any expected time frame?

Have you faced any issue in past with the respect to these 2 approach entity action or advance sql?

According to Outsystems best practise you should always go for Advance SQL for bulk operation.

https://success.outsystems.com/documentation/11/building_apps/data_management/data_operations/best_practices_for_fetching_data/

 

regards,

Manish Jawla

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.