On Wed, 2005-10-19 at 17:39 -0400, Anoop kumar V wrote:
> I have 2 tables used for reporting and there are no primary keys or
> indexes for either. I am trying to run a select query to identify some
> rows that need to be removed. But for around 100,000 rows the query is
> taking too long. Can somebody please help me in tuning this query?

You have answered your own question! The problem is that there are no
indexes on your tables. Indexes are designed to speed SELECT queries up,
so not having indexes will cause your SELECT queries to slow down.

Define indexes on the columns you are querying against; I'd start with
accountstatus, eid, loginid, applicationname, profilecode...

>From the names I'd suggest some of those might be UNIQUE indexes or
PRIMARY KEYs.

-- 
Jasper Bryant-Greene
General Manager
Album Limited

e: [EMAIL PROTECTED]
w: http://www.album.co.nz/
p: 0800 4 ALBUM (0800 425 286) or +64 21 232 3303
a: PO Box 579, Christchurch 8015, New Zealand


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to