[MDEV-3327] LP:771761 - Twice as many Innodb_rows_read with Rowid-ordered scan Created: 2011-04-27 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Sergei Petrunia |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Not repeatable in maria 5.2. The following query against the DBT-3 scale 1 set: SELECT COUNT( * ) FROM lineitem Causes the Innodb_rows_read counter to increase by 1204 , which is twice the number of rows examined by the query. In maria-5.2, the counter increases by 602 Explain:
The table was Innodb, with innodb_stats_sample_pages = 128 and ANALYZE TABLE |
| Comments |
| Comment by Sergei Petrunia [ 2012-03-02 ] |
|
Re: Performance regression with Rowid-ordered scan - twice as many Innodb_rows_read @@optimizer_switch='mrr=on' causes "Rowid-ordered scan" to used, and twice as many Innodb_rows_read counter increments. |
| Comment by Sergei Petrunia [ 2012-03-02 ] |
|
Re: Performance regression with Rowid-ordered scan - twice as many Innodb_rows_read |
| Comment by Sergei Petrunia [ 2012-03-02 ] |
|
Re: Performance regression with Rowid-ordered scan - twice as many Innodb_rows_read ( l_commitDATE >= '1998-12-22' AND l_commitDATE IN ( '1993-12-11' , '1994-12-09' ) the part with l_commitDATE is always FALSE, however, if we remove it, the query will use ref(const) and not range with MRR. |
| Comment by Sergei Petrunia [ 2012-03-02 ] |
|
Re: Performance regression with Rowid-ordered scan - twice as many Innodb_rows_read range, which covers all key components. This way, the records it reads will already be in rowid order. We could have had special handling for this kind of range scans but we didn't because we assumed that they will be converted to ref(const), which does not use MRR. |
| Comment by Sergei Petrunia [ 2012-03-02 ] |
|
Re: Performance regression with Rowid-ordered scan - twice as many Innodb_rows_read |
| Comment by Sergei Petrunia [ 2012-03-02 ] |
|
Re: Twice as many Innodb_rows_read with Rowid-ordered scan We may need to re-work server status variables, though, because now their correct interpretation is counter-intuitive (more reads == better, why???) |
| Comment by Rasmus Johansson (Inactive) [ 2012-03-02 ] |
|
Launchpad bug id: 771761 |