Sometimes we are not sure if the database design we have created
and our site has been using is correct and optimised. We all do
have this feeling at times don't we :)
Well, MySQL provides with PROCEDURE ANALYSE() to help us
detect inconsistencies in our database design by suggesting for
an optimal datatype and data length for columns.
The syntax for using PROCEDURE ANALYSE() is as
below:
SELECT ... FROM ... WHERE ... PROCEDURE
ANALYSE([max_elements,[max_memory]])
Ref: …
I got a question a while ago that I thought was quite simple, but turned into an interesting discussion: How much hard disk space does a database take up?
As it happens, there's a simple answer and a much, much more involved (yet ill-defined) answer, and which one you choose depends on what you think goes into a database and how very, very pedantic you are.
The Simple Answer
You can query the size of table and index data using Information Schema or SHOW TABLE STATUS. The columns DATA_LENGTH and INDEX_LENGTH contain the number of bytes for the table and index data respectively. You can construct simple queries based on that data, or do a quick search on the web for more interesting queries (For example, Peter Zaitsev of Percona wrote a post …
[Read more]According to Wikipedia, in April 2008, the number of videos on Youtube was 83.4 million (ref: http://en.wikipedia.org/wiki/YouTube#cite_note-5). However, the link in the cite note now displays “*†video results 1 – 20 of millions, without showing the real count.
Here's one way I found to get an estimated, but relatively accurate, number of videos on the popular video sharing site Youtube. The idea is simple. Get this feed: http://gdata.youtube.com/feeds/api/videos/-/* and parse out the number inside the <opensearch:totalresults> tag.
…
[Read more]