Query Entity vs Execute stored procedure function

Certified Senior Developer

Hi All,

Whats the difference between query entity and execute stored procedure function from the execution stand point. When we get the data from tables or views.

Will there be any heap issues when we use executestoredprocedure function? what are the pros and cons of using executestoredprocedure() functions.

  Discussion posts and replies are publicly visible

Parents
  • Hi 

    In my opinion, query entity is more controlled and protective of the Appian System. It will limit the quantity of data being accessed from the tables, whereas executing a stored procedure can be uncontrolled - without knowing you could easily bring in a couple of hundred thousand records into memory - attempt some transformation and then consume all the heap leading to a system outage 

    Don't get me wrong, Stored Procs can be very handy if used correctly and suitable limits placed on the stored proc akin to what you'd get from OOTB functionality in Query Entity. 

    Just my opinion though. 

    Cheers

    Paul

  • 0
    Certified Senior Developer
    in reply to paulc919

    Lets say query entity with startIndex as 1 and batch size as 20 will get 20 rows... iff we perform the same operation using stored procedure LIMIT 0,20 in my SQL query. What would be the impact?

     in our use case when we query a view using query entity its taking lot of time to get 20 rows... but when i execute the same in SP its very fast.

Reply Children