| List: | Internals | « Previous MessageNext Message » | |
| From: | 谢立超 | Date: | January 9 2011 3:00pm |
| Subject: | Optimization about count(*) | ||
| View as plain text | |||
sql: select count(*) from t where id > 10 and id < 1000000; In table t, there is an B-tree index on id field, this sql will read hundreds of thousandes of lines from the storage engine, this is a time-consuming operation. If tell the storage engine computing the count in the range, does it have higher performance? (using records_in_range() api and so on)
| Thread | ||
|---|---|---|
| • Optimization about count(*) | 谢立超 | 9 Jan |
| • Re: Optimization about count(*) | Sergei Golubchik | 9 Jan |
| • Re: Optimization about count(*) | sky.jian | 10 Jan |
| • Re: Optimization about count(*) | Sergei Golubchik | 10 Jan |
