[MDEV-2876] LP:916551 - Derived table optimization has wrong estimates for ORDER BY ... LIMIT Created: 2012-01-14 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: | Sergei Petrunia | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
If I load mysql-test/include/world{_schema,}.inc and run the following query: MariaDB [world]> explain select * from (select * from Country order by Population ASC limit 10) as small_country ;
---
--- I get 239 as the number of rows which will be scanned in table <derived2>. This estimate is wrong, it should be easy to figure that "LIMIT 10" caps table |
| Comments |
| Comment by Sergei Petrunia [ 2012-01-14 ] |
|
Re: Derived table optimization has wrong estimates for ORDER BY ... LIMIT |
| Comment by Igor Babaev [ 2012-01-18 ] |
|
Re: Derived table optimization has wrong estimates for ORDER BY ... LIMIT |
| Comment by Elena Stepanova [ 2012-03-18 ] |
|
Re: Derived table optimization has wrong estimates for ORDER BY ... LIMIT |
| Comment by Rasmus Johansson (Inactive) [ 2012-03-18 ] |
|
Launchpad bug id: 916551 |