cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SQL INSERT?

michal_lewicz2
Newcomer

I not fully confident about SQL INSERT.

Lets said that I can see in database exe/call_transaction SELECT 30x. That mean, a single transaction calling this 30 Times. But what if there is INSERT instead of SELECT? Its that mean 30 INSERT in to data base the same value? Its that normal, possible or what that means?.

5 REPLIES 5

Babar_Qayyum
Leader

Hello Michal,

Watch the below performance clinic to understand the database diagnostics use cases.

https://www.youtube.com/watch?v=pEXfqzE-WQM&list=PLqt2rd0eew1bmDn54E2_M2uvbhm_WxY_6&index=43

Regards,

Babar

Cody_Kachelski
Dynatrace Helper
Dynatrace Helper

Hi Michal,

Yes, that is right, if the purepath node says 30x INSERT "some value", that means the same INSERT statement was completed 30 times, it is aggregated to a single line both for readability and to prevent unnecessary over instrumentation. If it is normal depends on the context of the application, if you believe the INSERT should only be done once, then it should be investigated, especially if this is causing high response times. Please comment with any further questions. Thanks

-Cody

Do we know that the bind values in these statements are the same? I always thought it would aggregate but the individual elements in the SQL could be different. The documentation doesn't seem to say, but since you can't capture bind values and have aggregation enabled at the same time I'm thinking the statements need not be identical (could have different bind values).

Regardless, as an FYI to Michal you can disable the aggregation in the relevant database sensor configuration (i.e JDBC) if you'd like to confirm what is going on.

https://community.dynatrace.com/community/display/DOCDT65/JDBC+Sensor#JDBCSensor-DatabaseAggregation

James

I would have to assume that since the bind values aren't captured, Dynatrace doesn't know if they are or aren't the same, so they could be different, typically they just show as (?,?,?) etc..

I'd also say to keep an eye on your transactions if you disable aggregation, as those 30x Inserts will now be 30 individual nodes.

michal_lewicz2
Newcomer

This information solved my problem.

Thanks for your answer. 🙂