Reputation
Top tag
Next privilege 125 Rep.
Vote down
Badges
2
Newest
 Tumbleweed
Impact
~314 people reached

  • 0 posts edited
  • 0 helpful flags
  • 0 votes cast
Apr
22
awarded  Tumbleweed
Apr
15
asked Expand a date range in mongodb
Apr
13
awarded  Student
Apr
12
comment Oracle faster overlap check
@Phil I've thought of one more solution, oracle will count the index only when count() is done on a NOT NULL column with an index. If beginRange and endRange are NOT NULL and both have an index, we can have three sums: [ count(endRange) where inputBegin > endRange ] + [ count(beginRange) where inputEnd < beginRange ] = [ count(beginRange/endRange) ] Above is true if there is no overlap. so with UNION ALL I would get three rows, and in the code I need to check if sum of first two equals the third. Of course I'm assuming only index will be counted and no rows will be accessed. Any other way?
Apr
12
comment Oracle faster overlap check
@Phil I didn't get you
Apr
12
comment Oracle faster overlap check
@Phil but when we're doing a count(*) wouldn't it be enough to count the index entries itself? Is it always like this?
Apr
12
comment Oracle faster overlap check
@Phil in your example, what is causing a 'TABLE ACCESS BY INDEX ROWID', why will oracle not count the index only?
Apr
12
asked Oracle faster overlap check