"XXX is using named prepared statements instead of adhoc=false. This way they can better manage the lifecycle of the prepareds and reference by name, etc. They have logic build into the application that will attempt to execute the prepared (i.e. EXECUTE name_of_prepared) and catch a prepared not found exception, prepare the query and then reexecute.
This is safety logic that is in place in the application, as externally they have a script that automatically attempts to prepare everyone of their queries whenever they do a build.
However, retries make for a long delay as the queries timeout instead of immediately returning with a failed prepared query status/error."