+--------------+-----------------------+------+-----+-------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+-----------------------+------+-----+-------------------+----------------+ | id | int(11) | | PRI | NULL | auto_increment | | owner_id | int(11) | | MUL | 0 | | | owner_name | varchar(50) | | | | | | visitor_id | int(11) | | MUL | 0 | | | visitor_name | varchar(100) | | | | | | visit_time | timestamp | YES | | CURRENT_TIMESTAMP | | | first_time | int(10) unsigned | | | 0 | | | last_time | int(10) unsigned | | MUL | 0 | | | visit_num | mediumint(8) unsigned | | | 0 | | | status | tinyint(3) unsigned | | MUL | 0 | | +--------------+-----------------------+------+-----+-------------------+----------------+ That's the table which has more than 20 million records. On Wed, Mar 26, 2008 at 10:20 AM, Chris <dmagick@xxxxxxxxx> wrote: > Shelley wrote: > > Yes, Index can help a lot. > > But actually there has been five indices. The table takes 1.4G space > > while the indices take 2.3G. > > The select sentence is still slow. :( > > Post your exact query, table definition(s), indexes and see if anyone > has some suggestions. > > If it's a mysql db, join one of the mysql lists and see if anyone has > some suggestions (though they will ask for the same info). Same for any > other db. > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > -- Regards, Shelley