Databases Reference
In-Depth Information
We notice that, in the generated SQL query, we do not see our original CREATE
VIEW statement. The reason is that we are selecting from the view using a SELECT
statement, hiding the fact that we are pulling data from a view. However, exporting
the view's structure would show how MySQL internally stored our view:
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER
VIEW `book_public_info` AS
select `book`.`isbn` AS `number`,`book`.`title` AS `title` from
`book`;
The main panel's menu may look similar to that of a table. However, when
necessary, phpMyAdmin generates the appropriate syntax for handling views.
To perform actions on existing views, a user needs to have the
appropriate privilege at the view level, but not necessarily any
privilege on the tables involved in this view. This is how we can
achieve column and table hiding.
Controlling row counting for improved
performance
phpMyAdmin has a configuration parameter, $cfg['MaxExactCountViews'] , that
controls the row-counting phase of phpMyAdmin. Sometimes, a view comprises
many huge tables, and browsing it would make a large number of virtual rows
appear. Therefore, the default value of 0 for this parameter ensures that no row
counting happens for views. In this case, we will see rather strange results when
browsing a view: Showing rows 0 - -1 (0 total, Query took 0.0006 sec) . This is more
acceptable than slowing down a server.
Nonetheless, if we prefer to see a more exact row count for views, we can put a larger
value in this parameter, which acts as an upper limit for the row counting phase.
Supporting routines—stored procedures
and functions
It took a while before phpMyAdmin started to include support for stored procedures
and functions. The reason is that these are blocks of code (like a sub-program) that
are kept as a part of the database. phpMyAdmin, being a web interface, is more
oriented towards operations that are performed quickly using a mouse.
 
Search WWH ::




Custom Search