Database performance comparisons are usually made in terms of
millions of rows. MySQL, even running on a fairly regular PC, can easily cope with a few tens of millions of rows. Oracle can scale even higher. The reason is
indices. When designing the database schema, you decide which columns you'll want to be able to search on, order by etc. and tell the DBMS to keep an index. Indices slow down INSERTs, because the item has to be indexed, but drastically improve SELECT speeds.
In a sense you're right, because without an index every query pertaining to votes would have to loop across the entire table, which would be way slow. But Vroom or whoever designed the voting system wisely chose to index the 'monk' column - thereafter making it very readily accessible
Learn a bit about modern DBMSs and you'll find youtself doing a few things:
- Realising that they're not just convenient alternatives to flat files - they're a whole world of data handling
- Laughing at co-workers who say "I've got a really big table - nearly a thousand rows!"
- Being immensely chuffed at how much work you can make the DBMS do really quickly - so you don't have to do it in your application (any time you find yourself SELECTing more rows from the DB than you need and then filtering them with perl, warning bells should go off).
I have no idea if Everything does store all the votes since ever - but the point is, it could.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.