On Wed, 2006-03-15 at 16:11 +0000, Richard Lewis wrote:
On Wed, 2006-03-15 at 15:55 +0000, David Reynolds wrote:
You might want to take a look at join_buffer_size and read_buffer_size. I think they are set quite low by default so you may want to make them a bit higher, if you've got the spare memory. I know this isn't quite what you were asking, but it may help to speed up the joins a bit.
Thanks for the tip.
I've added some lines to my /etc/mysql/my.cnf: [mysqld] join_buffer_size = 2M read_buffer_size = 2M sort_buffer_size = 3M
which I stole from someone's website. Does anyone know what sort of values would be "high" here? Or what would be reasonable to use?
Hang on, I've just read the MySQL docs and it says that join_buffer_size only comes into play when you are using joins with no keys. My joins do use primary keys so, according to the docs, I'm better off increasing my key_buffer size. I tried this, all the way up to 256MB but it didn't make any difference.
I think I'll stick with my first idea of an index table because it'll have some other advantages for my app if I can get it to work.
Cheers, Richard