Planning of Select on PostgreSQL 9.6 partitioned table very slow
The normal advice is not to go above 100 or so partitions, and 9300 is way beyond that.  But still, it shouldn't take 12 seconds.  Creating a simple simulation of 9300 partitions in 9.6, each with one constraint and one index, it takes about 1.2 seconds to plan a query (or about 2.0 seconds to do it the first time in a given session) which hits the parent and exactly one child.

I've repeated the simulation with two separate check constraints, instead of one constraint which ANDs together the conditions, and with an additional index on all the tables, and it didn't meaningfully change the results.  Planning it is not speedy, but still nowhere near 12 seconds.

Can you monitor the system (with top, for example) to see what is going on?  Or better yet, use perf top to identify the bottleneck?