In article
<Pine.GSO.4.63.0509261701260.18250-PnKidU7MZKzcl/KssxhpDpUoLBXZAXmj@public.gmane.org>,
hgs-C9usXPTk/FFaa/9Udqfwiw@public.gmane.org says...> How big can tables get before performance gets poor?
> Yes, it depends on machine speed, desired response time, and
> probably what is in the table, but there may be order of magnitude
> rules of thumb here....
It depends SO much on those factors (as well as the most important
factor, the database engine) that I''m not sure there''s an
answer any
more specific than to the question "how long is a piece of string, in
general"?
To give you some idea, every AOL member''s mailbox (the list of their e-
mail) is stored in a single SQL table - read, unread and outbound (until
recently, there were no folders, but IIRC the folder-ID is just an
indexed field in the table). For some system mailboxes, this can tally
in the tens of thousands of messages. It''s never been a performance
problem; in fact, it is significantly faster than the flat-file, single-
record blob-type storage previously used for the list. But, again,
it''s
hard to compare, because the blob was on a slow filesystem on a slow
minicomputer, and the database is on a minicomputer that actually
implements SQL at the disk-controller level for speed.
A lot depends on whether you can pull all the data in one query or not.
If you can, most databases can efficiently perform most queries most of
the time. If you''re making thousands of queries, one for each row,
then
yeah, you''ll run into problems. That''s why "eager
loading of
associations" was such a win for Rails.
--
Jay Levitt |
Wellesley, MA | I feel calm. I feel ready. I can only
Faster: jay at jay dot fm | conclude that''s because I don''t
have a
http://www.jay.fm | full grasp of the situation. - Mark Adler