Hi. On Sat 2003-01-25 at 13:36:01 +0100, [EMAIL PROTECTED] wrote: [...] > mysql> select count(id) as Films, ProductionYear from DVD > -> group by ProductionYear > -> order by ProductionYear desc; [...] > 39 rows in set (13.32 sec) > > mysql> > *************************************** > > How is this possible ?? 13.32 seconds ???
Good question. I do not know the answer, but I can tell you that there is something seriously screwed up. It should only take a fraction of a second. When I run a similar query on my database, it displays 0.00 sec, i.e. it took less than 0.01 secs. The same query on a database with 600.000 records takes about 4.7 secs. > And this was when I was directly logged on to the Database (via Localhost)! > > When Using my Paradox table this took 1.5 second through my CGI script over > the Intranet. [...] > What can I do to speed this up ? As I said, I am not sure. This is not a question of optimizing your database or queries. Your installation of MySQL does not behave normally. Usually, there is no way any operation on 320 records would take more than at most 0.1 seconds or such. > PS: The DVD table containing the 320 records is the only table on the > server. (except from the MySQL database and the empy Test Database). Both > the Paradox Table and the MySQL server is installed on the same Harddrive so > harddisk speed shouldn't be a factor. Harddrive speed shouldn't be a factor at all, as 320 records need so few memory that they usually are kept in memory after first access. > Appreciate any help to solve the above :-))) Just to be sure to exclude anything I might not have thought of, can you post the result of EXPLAIN for the select above SHOW CREATE TABLE DVD SHOW INDEX FROM DVD SHOW TABLE STATUS LIKE 'DVD' Is there anything running on the server while you do your tests? Regards, Benjamin. -- [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php