MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Jan Dvorak Date:February 15 2000 2:29pm
Subject:Re: performance on small db's
View as plain text  
Hi,

sinisa@stripped wrote:
> 
> robert rotman writes:
>  >
>  > the output is:
>  > +-----------+------------+------+-----+---------+-------+
>  > | Field     | Type       | Null | Key | Default | Extra |
>  > +-----------+------------+------+-----+---------+-------+
>  > | domain    | char(127)  |      | PRI |         |       |
>  > | password  | char(32)   |      |     |         |       |
>  > | max_pop   | tinyint(4) |      |     | 0       |       |
>  > | max_alias | tinyint(4) |      |     | 0       |       |
>  > +-----------+------------+------+-----+---------+-------+
>  >
>  > and the query is somthing like this:
>  >
>  > select domain from mail_adm where domain='$domain'
>  > (i want to see if a 'domain' is there;)
>  >
>  > robert
>  >
>  >
> 
> Hi!
> 
> You are querying a table with a restrict on the indexed column.
> 
> That is almost the best you can do.
> 
> There is anyway one notable improvement you can make. Make index
> smaller then 127 chars !!
>
> Regards,
> 
> Sinisa

Another tip:
Define your 'domain' of type varchar(127).
That will strip away trailing spaces,
resulting in a size reduction in both the data
and the index files.
If most of your domains have shorter names
than 127 chars, that is.

Jan
Thread
performance on small db'srobert rotman14 Feb
  • Re: performance on small db'ssasha14 Feb
    • Re: performance on small db'srobert rotman15 Feb
      • Re: performance on small db'ssinisa15 Feb
    • Re: performance on small db'sJan Dvorak15 Feb
Re: performance on small db'sBruce Loving16 Feb
Re: performance on small db'ssinisa16 Feb
  • Re: performance on small db'sWico de Leeuw16 Feb