Reputation
275
Top tag
Next privilege 300 Rep.
Create new tags
Badges
3 11
Impact
~5k people reached

  • 0 posts edited
  • 0 helpful flags
  • 8 votes cast
Apr
26
comment Fast general method to calculate percentiles
I had not, many thanks.
Jan
25
comment Efficiently finding distinct values
In this case this solution has the added benefit that it's much more efficient if there is only a sorted index on (month, year, number) instead of a unique constraint. Of course YMMV.
Jan
24
comment Efficiently finding distinct values
Thanks, +1. A nice alternative.
Jan
23
comment Efficiently finding distinct values
The statement is pretty long and I'm not familiar with all the idioms (my background is CRUD MySQL apps). I had to look up with m as and the decode function. With some Googling I managed OK. So you're answer is really fine, I just missed some basic knowledge. I do wonder why the database can't optimize the query by itself. I imagine a binary tree starting with month and then year. Checking which (month, year) tuples exist seems so easy.
Jan
23
comment Efficiently finding distinct values
Your solution is a bit over my head but I figured it out. Works like a charm!
Jan
23
comment Efficiently finding distinct values
Thanks, I added some more information to the question.