I'm using django to create a database and I manually created a test values in the database by creating objects and saving them to the database.
Now when I run this query:
select TABLE_NAME,
TABLE_ROWS
from information_schema.tables
where table_schema = 'test_test_db';
It returns the tables with the correct number of rows. For example, a table 'accounts_users' has 4269 rows.
But when I try to select any values using select username from accounts_users;
, I get 0 rows back or 'Empty Set' result.
And of course my django app cannot run because there is "no" data in the database.
What is wrong?
Best Answer
I tried manually adding a test user and the TABLE_ROWS was updated "4270" but when I select I get only the test user I added. Anyway, I learned that TABLE_ROWS is only a rough estimate and I guess it is not updated regularly enough.