answersLogoWhite

0

A database view is a logical table query that permits the database architect to create a special view of data without having to have a larger complex query used each time. This makes the query run faster than even using prepared statements.

For example, you might create a view to show the last 10 blog posts, which would allow you to simply say:

select * from `last_10_posts`

instead of

select * from post order by post_date desc limit 10 where public = true and owner_id = 5

As you can see, using a view can greatly the preparation time of a query, and also allows you to change the implementation of the underlying view without having to go to each place where that query takes place and update the code multiple times.

User Avatar

Wiki User

15y ago

What else can I help you with?