From: Jorge Bastos Date: April 14 2006 9:47am Subject: group slow List-Archive: http://lists.mysql.com/win32/18202 Message-Id: <004801c65fa8$801f7ed0$0301a8c0@hercules.decimalint.pt> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0045_01C65FB0.E1BDC130" ------=_NextPart_000_0045_01C65FB0.E1BDC130 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable DecimalHi people, Is there any procedure to make the group function faster? I mean, i have a tabel with 200.000 record and about 8 fields, a command = like: --- select username,count(*) from table group by username --- will take about 4/5 secunds a simple select count(*) from table will take 0.00045 secunds ( more or less ) here's the table description: +---------------+---------------+------+-----+---------------------+-----= --+ | Field | Type | Null | Key | Default | = Extra | +---------------+---------------+------+-----+---------------------+-----= --+ | username | varchar(255) | | MUL | | = | | filename | text | | | | = | | file_bytes | bigint(15) | | | 0 | = | | remote_host | varchar(255) | | | | = | | remote_ip | varchar(255) | | | | = | | command | varchar(255) | | | | = | | transfer_time | decimal(12,5) | | | 0.00000 | = | | date_time | datetime | | | 0000-00-00 00:00:00 | = | | info | varchar(2) | | | | = | +---------------+---------------+------+-----+---------------------+-----= --+ Jorge ------=_NextPart_000_0045_01C65FB0.E1BDC130--