MySQL: Show count of records in each table of a database

December 12, 2012

I recently did a dump of my database on this site and it was almost 300 megabytes! That is pretty huge for a simple personal site. Curious as to where all that data was hiding I whipped up a quick SQL query that calculates the total number of rows per table in a single database.

MySQL: Count number of columns in a table

February 6, 2012

Counting the number of columns, or fields, in a MySQL table is a fairly simple, though not exactly obvious task. You will need to know both the name of the table to query on, as well as the database. The query is as follows, plug in your values for database_name and table_name SELECT COUNT(*) FROM

Typo3: Count the number of Pages, Content, and Words in your install

May 17, 2010

Ever wonder how many pages, words or tt_content element you have in your Typo3 install? I am working with two large Typo3 sites and I was curious so I wrote a little piece of code. It works really well and is super quick. Here is what the output looks like: Counting Pages SELECT COUNT(uid) AS

PHP: Count words in a MySQL column

April 27, 2010

Last week I posted a query that will return the number of words in a column of a table in a MySQL database. I was looking through a huge database and the query took a really really long time. Today I decided to rewrite it in PHP and see if it was faster. Much Much

MySQL: Count Words in Column

April 13, 2010

I have been working on a rather large database that contains mostly textual page content. Out of curiosity I decided to see how many words are contained in the column with my content. I did not find a simple MySQL solution to finding the word count, but here is what I did come up with.