0

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";
3
  • 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
    Commented Apr 7 at 9:16
  • 1
    @nbk - I'm not sure what you mean by the above - check here.
    – Vérace
    Commented Apr 7 at 11:56
  • then answer the question#
    – nbk
    Commented Apr 7 at 11:57

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.