4 messages in com.mysql.lists.win32big table, slow queries...???
FromSent OnAttachments
Ferhat BINGOL22 Feb 2003 06:21 
Petr Vileta22 Feb 2003 19:46 
Bernard23 Feb 2003 13:00 
jbon...@sola.com.au23 Feb 2003 14:50 
Subject:big table, slow queries...???
From:Ferhat BINGOL (s021@student.dtu.dk)
Date:02/22/2003 06:21:28 AM
List:com.mysql.lists.win32

Hi,

I am new at this group. Nowadays I am using PHP/MySQL more than ever. I have a problem with making queries on my huge database (totally more than 20 million rows and 9 GB).

The main problem is it is rather slow. For example I am making a query which is checking the 5 biggest tables for, from 2 "where" options to 20. I am using something like that;

SELECT table1.field1, table1.field2, table1.field3, table2.field2, table3.field2, table4.field1, table5.field1, table5.field2 FROM table1, table2, table3, table4, table5 WHERE (table1.field1=table2.field1) AND (table3.field4 BETWEEN case1 AND case2) ....

(Where statement is longer than this)

and so on. I think you understand the structure I use for making queries. But it is too slow. I mean I was expecting to be faster.

Can you advice me a different kind of query string? I read some articles about using JOIN, GROUP or so on. But I am little bit confused about it.

What is the best way to make queries on big table?

Thanks, FERHAT

P.s : I am using MySQL 3.23 and PHP/Apache on a Windows XP machine. 386 MB RAM with Pentium3 350.

Ferhat