1) The collation specifies the comparison rules. The size of the database should be irrelevant for this. Performance will depend on the indexing 2) You should most definately add an index for the primary key as this will dramatically improve performance on a large table like this (without an index the table will be scanned looking for the item - ie to find out that an entry is not present it will check for a match on all 10 million records). As you are infrequently/never adding/removing entries you will not be modifying the indexes (which could reduce performance)so you could add further indexes (e.g. on name or combined ID/name). However if the ID is unique you will only ever get 1 record returned so other indexes are unnecessary (unless you want to get entries without specifying the ID). You might also consider using the SDBM module if this is only to be a simple key/value pair (e.g by always accessing via the ID). It is straightforward to tie the database access to a hash table so that access to the SDBM database is controlled as though it is a hash table. SDBM performance is much faster than MySQL lookups. This works very well if it is only a key/value pair.

In reply to Re: Questions on Perl & Mysql by timray
in thread Questions on Perl & Mysql by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.