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";
Vérace
31k9 gold badges73 silver badges86 bronze badges
asked Apr 7, 2024 at 6:32
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? Commented Apr 7, 2024 at 9:16
  • 1
    @nbk - I'm not sure what you mean by the above - check here. Commented Apr 7, 2024 at 11:56
  • then answer the question# Commented Apr 7, 2024 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.

answered Apr 8, 2024 at 8:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.