To view all indexes for a table or view, you can use sp_helpindex.FULLSCAN Compute statistics by scanning all rows in the table or indexed view. The actual percentage or number of rows the query optimizer samples might not match the percentage or number specified.To obtain a new instance of the JDatabase Query class we use the JDatabase Driver get Query method: takes an optional argument, $new, which can be true or false (the default being false).
Using the Joomla database layer ensures a maximum of compatibility and flexibility for your extension.
For example, if I was the software engineer working on the health tracker, I might write code that knows how to insert a new daily log in the database every time a user submits a form: I would probably be issuing that SQL command from inside a server-side language, likely using a library to make it easier to construct the commands.
This is what that insertion would look like if I was using Python with the SQLAlchemy library: I would also need to write SQL to modify the database if the user edited their daily log, deleted it, or even deleted their account.
Joomla can use different kinds of SQL database systems and run in a variety of environments with different table-prefixes.
In addition to these functions, the class automatically creates the database connection.