I am using the following query to fetch a total number of rows from MySQL but it used Full table scans
. I just want to avoid full table scans.
SELECT COUNT(id) as total_rows FROM <table_name>;
Please consider that I don't want to use the WHERE
condition. id
is my PK. This link may help you for better understanding https://drive.google.com/open?id=1nvyUHkzjWlCji8rZoH0aMq9pqSSDMqJO.
Is there any way to fetch a total number of rows without Full table scans
?