Re: Wrong estimation of Rows in explain
The PARTITIONing provides no performance gain.
The query is asking for 3 million rows from one table, then randomly reaching into the other table 3 million times. Since `innodb_buffer_pool_size` is very small (it should be about 70% of _available_ RAM), the query will have to do a lot of I/O.
I don't see a row estimate of 2; I do see 17. Either of those could be reasonable, since it it not the number of rows in the table, but rather the number of rows in the second table for each row of the first table.
It is usually a mistake to have a pair of columns like this in some table other than a table with "only" these:
AttributeId int(11) ,
AttributeName varchar(100) ,
Do you need 2 billion values for those various IDs? Consider `SMALLINT UNSIGNED` (65K distinct values), or other sizes of INTs. That will save some space.
Subject
Views
Written By
Posted
2253
July 27, 2016 06:19AM
1152
July 27, 2016 08:55AM
1219
July 27, 2016 11:58PM
1086
July 28, 2016 09:14AM
1043
July 29, 2016 05:11AM
1023
July 29, 2016 01:10PM
Re: Wrong estimation of Rows in explain
1075
July 29, 2016 06:58PM
1000
August 02, 2016 05:48AM
1066
August 02, 2016 06:23PM
1002
August 02, 2016 05:38AM
1013
August 04, 2016 05:31AM
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.