views:

493

answers:

2

I am using Joomla 1.5 and VirtueMart 1.1.3.

There is an issue where tmp files that are 1.6 GB are created every time a certain query is executed. is this normal? I think virtuemart is using a huge join statement to pull the whole products table and several other tables. I found the file that builds the query but i don't know where to begin to optimize this. even if i did virtuemart seems to use this one file to build all sql statements so i could end up breaking something.

A: 

You could look at the MySQL slow query log (and/or enable it) to see the particular query taking time and space. With that in hand, you can use MySQL's EXPLAIN functionality to see why the query is slow.

If you're lucky, the VirtueMart developers simply haven't added valid indexes to their tables, which causes MySQL to have to do things the slow way (ie. filesort, etc). If you're unlucky, changing the schema won't help and you'll have to take this up with the VirtueMart developers, or fix it yourself.

In any case, if you find a solution, you probably should let the VirtueMart team know.

Best of luck!

AKX
Thank you very much. I discovered that one of the queries was using filesort.
Samuel
A: 

Did you ever find an answer to this. I have the same issue, over 1,000,000 products and it is creating so many tmp tables that its filling a 15gig tmp location and crashing MYSQL.

mark