Will creating a view Table in schema 2 that pulls data from Table on schema 1 , affect the database or cause any other issues? my code:
CREATE VIEW "test"."Excavation" AS
SELECT *
FROM "public"."Distribution_UG";
Vérace
31k9 gold badges73 silver badges86 bronze badges
asked Apr 7, 2024 at 6:32
-
Hi, and welcome to dba.se! Please don't put your questions in bold type - it hurts my head! :-) Also, you had the post tagged wtih SQL Server and PostgreSQL as well as with various PostGIS tags - I'm going to assume PostgreSQL (since that's in the question subject also - correct as necessary. Why would SELECTing from a different schema within the same database cause a problem? Have you performed any tests?Vérace– Vérace2024年04月07日 09:16:18 +00:00Commented Apr 7, 2024 at 9:16
-
1@nbk - I'm not sure what you mean by the above - check here.Vérace– Vérace2024年04月07日 11:56:37 +00:00Commented Apr 7, 2024 at 11:56
-
then answer the question#nbk– nbk2024年04月07日 11:57:45 +00:00Commented Apr 7, 2024 at 11:57
1 Answer 1
Creating a view does not cause any performance problem as such. Schemas don't make a difference there; they are just a logical category.
Of course it can impact your performance if you use the view — just like running the defining query can impact performance, because it consumes resources.
answered Apr 8, 2024 at 8:49
lang-sql