I have a database table with approx 3 million rows.
There are 9 indexes on this table.
The command:
SHOW INDEX FROM TRAN;
Returns results as expected with all indexes some valid "Cardinalit y"
values.
After a period of time or a series of events (unknown to me) the statistics
for one or more indexes shows a NULL value in the cardinality.
This causes queries that rely on these indexes to become incredibly slow,
sometimes doing a full table read.
I have been trying to find out what causes the statistics to become NULL?
Any help here would be appreciated.
I currently have a nightly process that scans for NULL table statistics then
updates (analyze table) any table effected.
Thank you for any help!
There are 9 indexes on this table.
The command:
SHOW INDEX FROM TRAN;
Returns results as expected with all indexes some valid "Cardinalit y"
values.
After a period of time or a series of events (unknown to me) the statistics
for one or more indexes shows a NULL value in the cardinality.
This causes queries that rely on these indexes to become incredibly slow,
sometimes doing a full table read.
I have been trying to find out what causes the statistics to become NULL?
Any help here would be appreciated.
I currently have a nightly process that scans for NULL table statistics then
updates (analyze table) any table effected.
Thank you for any help!
Comment