Performance optimisation. Do not query database for existence of schema upon every call#411
Performance optimisation. Do not query database for existence of schema upon every call#411NielsKSchjoedt wants to merge 2 commits intoinfluitive:developmentfrom
Conversation
…ma upon every call
|
thanks! what are the implications of this?
|
|
It removes the absurd amount of calls to: SELECT COUNT(*)
FROM pg_namespace
WHERE nspname = ?No exception is raised though, if you set the path to something like |
|
For me, it's ok too but without a specific error can lead to a misunderstood about the problem. Another way is to check the error to find a pattern like "relation (*) does not exist" and assume that error is because there is no schema. But is a weak solution. |
|
i was looking in to how this relates to the TenantNotFound exception, and oddly it looks as though the pg adapter won't raise TenantNotFound because ActiveRecord::StatementInvalid isn't being caught :/. I assume the intention here was to raise TenantNotFound like the abstract adapter's |

#288