* DeRyl
> explain example sql question gives:
[...]

The first thing to notice: "Using temporary"... this is to be avoided, if
possible.

The first table read is klientslowo based on the criteria
klientslowo.klientslowo LIKE 'sam%'. Is this a reasonable approach to
solving the query, giving your knowledge of the database structure and the
data distribution? MySQL estimates that 351 records matches this criteria,
is this close to the truth? If not, run ANALYZE TABLE.

<URL: http://dev.mysql.com/doc/mysql/en/ANALYZE_TABLE.html >

You should not need the DISTINCT keyword. There is no PRIMARY KEY in the
branzaslowa table, it seems to have duplicates?

You use a lot of bigint's... an unsigned int is usually sufficient, it
consumes half the disc/RAM space... this could be important for the speed of
the indexes. Optimally you would want all your indexes to fit in RAM, i.e.
the sum of the size of the indexes should be smaller than your index buffer
size (key_buffer_size).

I took a look at the variables from your previous posting. You should
increase the key_buffer_size, it is only 8M (default). If you only use
MyISAM tables, try setting it to half your total available RAM. This will
not affect the speed of the first few queries you run after a restart, but
when the caches get "hot" you get very improved speed.

<URL: http://dev.mysql.com/doc/mysql/en/Server_parameters.html >
<URL: http://dev.mysql.com/doc/mysql/en/MyISAM_key_cache.html >

--
Roger


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to