MichaelAquilina / Reddit-Recommender-Bot

Indentifying Interesting Documents for Reddit using Recommender Techniques
7 stars 0 forks source link

Ordering by Counter is slow because of lack of Index #79

Closed MichaelAquilina closed 10 years ago

MichaelAquilina commented 10 years ago

Adding an ORDER BY Counter; to a query will instantly make query performance slower (without actually affecting fetch performance of course). This is because it does not have an index. This means it should either be avoided or an Index should be added (but the cardinality of the index wont be too high due to lots of duplicate Counter values).

MichaelAquilina commented 10 years ago

Creating an Index on existing data proved to be way too slow. Next database index to be created should include an Index on Counter however to increase join speeds.

MichaelAquilina commented 10 years ago

The next database created will include an index for Counter (included in setup() of wiki.py)