MySQL Forums
Forum List  »  Partitioning

Re: table partitioning AWS MySQL - InnoDB
Posted by: Øystein Grøvlen
Date: September 11, 2017 01:27AM

Hi,

I doubt that partitioning will help you much since MySQL will only scan one partition at a time.

10 minutes sounds like a lot. However, it depends on how large your rows are. What is the total table size?

What version of MySQL are you using? There was a change for early versions of 5.7 that would always use a table scan for the counting even if a much shorter index was present. This was reverted in MySQL 5.7.18.

Do you need an exact count? If an estimate is sufficient, you could try
SELECT n_rows FROM mysql.innodb_table_stats WHERE table_name=<table_name>;

Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

Options: ReplyQuote


Subject
Views
Written By
Posted
1803
September 09, 2017 05:21AM
Re: table partitioning AWS MySQL - InnoDB
1174
September 11, 2017 01:27AM
1263
September 11, 2017 08:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.