forcedotcom / phoenix

BSD 3-Clause "New" or "Revised" License
558 stars 227 forks source link

isFilterDone() not needed with nextRaw() #620

Closed lhofhansl closed 10 years ago

lhofhansl commented 10 years ago

Hey James,

just worked on https://issues.apache.org/jira/browse/HBASE-10117 and noticed that Phoenix unnecessarily calls RegionScaner.isFilterDone() in some (hot) places. isFilterDone() is synchronized and hence causes a noticeable slow down. nextRaw() internally calls isFilterDone and only returns true if isFilterDone() returns false, so the extra call is unnecessary,

lhofhansl commented 10 years ago

Note that HBASE-10117 will make the call to isFilterDone() in nextRaw() unsynchronized. Together these two changes will yield a 20-30% improvement in COUNT(1) type queries in tall tables.

jtaylor-sfdc commented 10 years ago

Wow, awesome!!! Thanks, @lhofhansl.