I have an application that CREATE-IF-NOT_EXISTs a long list of tables when it first connects.
Performance is acceptable on the corporate LAN, since it stays connected for a long time between restarts, but it is painfully slow with the added latency on the WAN.
Rather than iterate through a loop of individual creates, I would like to issue one SQL query that will efficiently tell me whether all required tables are present, so I can bypass the optional setup step.
I've found a number of answers on StackOverflow for how to do with with a single table, but I don't know how to expand those examples to use a list of table names.
Can anybody suggest how to efficiently tell me if all the named tables in a list are present? (the query should fail if any of the listed tables does not exist, and succeed otherwise.)
(No discussion on whether creating/checking for tables on each connect is a good idea, please - I can't control this part of the design.)