Like an RPG or COBOL program having a file open. It is easier with SQL to accidentally open and close a file every time a record is read. In RPG or COBOL, you would open a file, leave it open for the entire duration of the program or job and then close it at the end. If not, you need to fix it. This can have a dramatic affect on performance.
With dynamic SQL coming from a client/server or web application, open data paths are typically not reused. This is one factor that causes these applications to perform poorly. Using static SQL is more difficult but may be necessary for high volume applications. With SQL imbedded in an RPG or COBOL application, you need to pay attention to the compile options. Even if the ODP is reusable, it might still be getting closed after each read if the CLOSE(*ENDJOB) parameter is not set properly at compile time.