Re:PostgreSQL Scalability: Towards Millions TPS
by merb on Tuesday May 10, 2016 @08:19AM
(#11666657)
Actually that's wrong:
With Index:
Actually that is called a index only scan, and happens when you have a data type that is inside your index. Which means if you need a aggregate you could try to index everything you need. Mostly a aggregate only contains some values of a row so a index is mostly not a problem.
[ Parent
| on HN ]
Re:PostgreSQL Scalability: Towards Millions TPS
by anarazel on Tuesday May 10, 2016 @10:23AM
(#11667366)
I didn't say an index couldn't be used at all. Just not to actually make the query fast. This will get all duplicates for a value from the index, before going to the next value. If you have a couple thousand or more of each to be counted value that'll make the query rather slow.