database design - Are PostgreSQL VIEWS created newly each time they are queried against? -
I am preparing a web app with some complex underlying entities. To solve many issues, I had created a union scene. There may be many such solutions also resolved.
But now I am considering the efficiency of my design, and I have to know whether a view is made new once every time it is asked, or it has only been created once, and the update is done.
To expand, if I have table_A (100 records) and table_b (100 records) and create a union view, then I have created a scene with 200 records. / P>
Is this the whole process every time I make a selection against the view?
Again, obviously, when I update the underlying table, the scene is updated, but the scene is updated by a record or it rests the whole scene from scratch?
Dell
There is nothing more than a query with the view name possible That perf-related optimization, some DBMSs feel better than others (PGSQL is in a better side), such as re-using query plans, cached access controls, etc.
However, those days, almost always, you can expect a view to behave like a straight release to SQL, with the difference you can access this query w / o to the built-in tables Can provide access.
There are customizations you can make that change the behavior (make them half-table-like) and or perhaps there is no such thing as physical ideas (no information about PGSQL) in PGSQL. But this is just nipeting.
Comments
Post a Comment