Re: Long Running Queries

2004-10-07 Thread m . muller
How do you do to benchmark a query ?

I wish we had thought to have had him benchmark a query before and after he
added an index.  It would be interesting to see the difference in actual time
that an index can make on a table with 450,000 records.

On Wed, 2004-10-06 at 15:31, Jason Williard wrote:

 Amit,

 You are awesome!  That fixed it quite nicely.  Our system is screaming
 now :-)

 Thank You VERY MUCH!,
 Jason Williard
 Client Services





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



Long Running Queries

2004-10-06 Thread Jason Williard
Hello,
I recently began experiencing issues that I would like some assistance with.
Server Details:
 - Windows 2003
 - MySQL Max 4.0.20a
I have a table with 450,000+ records in it.  When I try to run a single 
query, such as selecting 1 row or deleting 1 row using the WHERE clause, 
the query can take forever to run.  In a specific case, it took 57 
seconds to complete the SELECT query.

Any ideas on how to speed this up?
--
Thank You,
Jason Williard

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


RE: Long Running Queries

2004-10-06 Thread Amit_Wadhwa
You need Appropriate Indexes on the tables. 

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 1:11 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Long Running Queries

Hello,

I recently began experiencing issues that I would like some assistance
with.

Server Details:
  - Windows 2003
  - MySQL Max 4.0.20a

I have a table with 450,000+ records in it.  When I try to run a single
query, such as selecting 1 row or deleting 1 row using the WHERE clause,
the query can take forever to run.  In a specific case, it took 57
seconds to complete the SELECT query.

Any ideas on how to speed this up?
-- 

Thank You,
Jason Williard



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



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



Re: Long Running Queries

2004-10-06 Thread Ted Byrne
Is the table indexed in any way?
At 03:40 PM 10/6/2004, you wrote:
Hello,
I recently began experiencing issues that I would like some assistance with.
Server Details:
 - Windows 2003
 - MySQL Max 4.0.20a
I have a table with 450,000+ records in it.  When I try to run a single 
query, such as selecting 1 row or deleting 1 row using the WHERE clause, 
the query can take forever to run.  In a specific case, it took 57 seconds 
to complete the SELECT query.

Any ideas on how to speed this up?
--
Thank You,
Jason Williard

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

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


Re: Long Running Queries

2004-10-06 Thread Jason Williard
I'm sorry to sound like a novice, but could you explain that?  Are you 
recommending that I set the column I am searching to an Index?

Thank You,
Jason Williard
Client Services

[EMAIL PROTECTED] wrote:
You need Appropriate Indexes on the tables. 

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 1:11 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Long Running Queries

Hello,
I recently began experiencing issues that I would like some assistance
with.
Server Details:
  - Windows 2003
  - MySQL Max 4.0.20a
I have a table with 450,000+ records in it.  When I try to run a single
query, such as selecting 1 row or deleting 1 row using the WHERE clause,
the query can take forever to run.  In a specific case, it took 57
seconds to complete the SELECT query.
Any ideas on how to speed this up?

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


RE: Long Running Queries

2004-10-06 Thread Amit_Wadhwa
appropriate indexes would mean indexes on columns specified in your
where criteria.
On this List, people mostly post table structures, as well as the
queries they are firing, or else it really doesn't help. 

-Original Message-
From: Danny Willis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 1:24 AM
To: Wadhwa, Amit; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: Long Running Queries

What do you mean by appropriate indexes?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 3:43 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Long Running Queries

You need Appropriate Indexes on the tables. 

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 1:11 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Long Running Queries

Hello,

I recently began experiencing issues that I would like some assistance
with.

Server Details:
  - Windows 2003
  - MySQL Max 4.0.20a

I have a table with 450,000+ records in it.  When I try to run a single
query, such as selecting 1 row or deleting 1 row using the WHERE clause,
the query can take forever to run.  In a specific case, it took 57
seconds to complete the SELECT query.

Any ideas on how to speed this up?
-- 

Thank You,
Jason Williard



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



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




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



Re: Long Running Queries

2004-10-06 Thread Michael Stassen
Not without more information.  At the very least, we need to see the query. 
 Better yet, show us what EXPLAIN has to say about your query 
http://dev.mysql.com/doc/mysql/en/EXPLAIN.html.

Michael
Jason Williard wrote:
Hello,
I recently began experiencing issues that I would like some assistance 
with.

Server Details:
 - Windows 2003
 - MySQL Max 4.0.20a
I have a table with 450,000+ records in it.  When I try to run a single 
query, such as selecting 1 row or deleting 1 row using the WHERE clause, 
the query can take forever to run.  In a specific case, it took 57 
seconds to complete the SELECT query.

Any ideas on how to speed this up?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Long Running Queries

2004-10-06 Thread Danny Willis
What do you mean by appropriate indexes?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 06, 2004 3:43 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Long Running Queries

You need Appropriate Indexes on the tables. 

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 1:11 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Long Running Queries

Hello,

I recently began experiencing issues that I would like some assistance
with.

Server Details:
  - Windows 2003
  - MySQL Max 4.0.20a

I have a table with 450,000+ records in it.  When I try to run a single
query, such as selecting 1 row or deleting 1 row using the WHERE clause,
the query can take forever to run.  In a specific case, it took 57
seconds to complete the SELECT query.

Any ideas on how to speed this up?
-- 

Thank You,
Jason Williard



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



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



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



RE: Long Running Queries

2004-10-06 Thread Danny Willis
Sorry this is still new for me and I'm learning as I go.  As I become more
knowledgeable my questions will become more specific and detailed.

Next question:
If I have certain fields within tables that I will be querying often it is
beneficial to set them as indexes for speedier lookups correct?  If so, why
is that?

Thanks!
Dan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 06, 2004 3:59 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Long Running Queries

appropriate indexes would mean indexes on columns specified in your
where criteria.
On this List, people mostly post table structures, as well as the
queries they are firing, or else it really doesn't help. 

-Original Message-
From: Danny Willis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 1:24 AM
To: Wadhwa, Amit; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: Long Running Queries

What do you mean by appropriate indexes?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 3:43 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Long Running Queries

You need Appropriate Indexes on the tables. 

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 1:11 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Long Running Queries

Hello,

I recently began experiencing issues that I would like some assistance
with.

Server Details:
  - Windows 2003
  - MySQL Max 4.0.20a

I have a table with 450,000+ records in it.  When I try to run a single
query, such as selecting 1 row or deleting 1 row using the WHERE clause,
the query can take forever to run.  In a specific case, it took 57
seconds to complete the SELECT query.

Any ideas on how to speed this up?
-- 

Thank You,
Jason Williard



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



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





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



Re: Long Running Queries

2004-10-06 Thread Jason Williard
Thank you for your assistance with this.  Here's what you were asking for.
Structure Output:
#
# Table structure for table 'asticketsdata'
#
CREATE TABLE asticketsdata (
  ticketdataid int(11) NOT NULL auto_increment,
  ticketidchar varchar(255) NOT NULL default '',
  ticketidno int(11) default NULL,
  contents text,
  emailbody text,
  PRIMARY KEY  (ticketdataid),
  KEY ticketdata1 (ticketidno)
) TYPE=MyISAM;
Query:
SELECT * FROM asticketsdata WHERE ticketidchar = 'IAZ-16393';
Thank You,
Jason Williard
Client Services

[EMAIL PROTECTED] wrote:
I have tables with millions of records.
1. I use Query-Caching and that speeds up all my selects/searches after
the first time, no matter how complicated the criteria.
2. Build Indexes on the columns that are in your 'where' Criteria, that
will help you big time.
If you post the table structure, and the query, I can help you with your
index.
-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 1:23 AM
To: Wadhwa, Amit
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Long Running Queries

I'm sorry to sound like a novice, but could you explain that?  Are you
recommending that I set the column I am searching to an Index?
Thank You,
Jason Williard
Client Services

[EMAIL PROTECTED] wrote:
You need Appropriate Indexes on the tables. 

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 1:11 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Long Running Queries
Hello,
I recently began experiencing issues that I would like some assistance

with.
Server Details:
 - Windows 2003
 - MySQL Max 4.0.20a
I have a table with 450,000+ records in it.  When I try to run a 
single query, such as selecting 1 row or deleting 1 row using the 
WHERE clause, the query can take forever to run.  In a specific case, 
it took 57 seconds to complete the SELECT query.

Any ideas on how to speed this up?




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


RE: Long Running Queries

2004-10-06 Thread Amit_Wadhwa
Do this and tell me if it helped

ALTER TABLE `asticketsdata` ADD INDEX ( `ticketidchar` ) 

Regards,
Amit

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 1:42 AM
To: Wadhwa, Amit
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Long Running Queries

Thank you for your assistance with this.  Here's what you were asking
for.

Structure Output:
#
# Table structure for table 'asticketsdata'
#

CREATE TABLE asticketsdata (
   ticketdataid int(11) NOT NULL auto_increment,
   ticketidchar varchar(255) NOT NULL default '',
   ticketidno int(11) default NULL,
   contents text,
   emailbody text,
   PRIMARY KEY  (ticketdataid),
   KEY ticketdata1 (ticketidno)
) TYPE=MyISAM;

Query:
SELECT * FROM asticketsdata WHERE ticketidchar = 'IAZ-16393';

Thank You,
Jason Williard
Client Services



[EMAIL PROTECTED] wrote:
 I have tables with millions of records.
 
 1. I use Query-Caching and that speeds up all my selects/searches 
 after the first time, no matter how complicated the criteria.
 2. Build Indexes on the columns that are in your 'where' Criteria, 
 that will help you big time.
 
 If you post the table structure, and the query, I can help you with 
 your index.
 
 -Original Message-
 From: Jason Williard [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 07, 2004 1:23 AM
 To: Wadhwa, Amit
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: Long Running Queries
 
 I'm sorry to sound like a novice, but could you explain that?  Are you

 recommending that I set the column I am searching to an Index?
 
 Thank You,
 Jason Williard
 Client Services
 
 
 
 [EMAIL PROTECTED] wrote:
 
You need Appropriate Indexes on the tables. 

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 1:11 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Long Running Queries

Hello,

I recently began experiencing issues that I would like some assistance
 
 
with.

Server Details:
  - Windows 2003
  - MySQL Max 4.0.20a

I have a table with 450,000+ records in it.  When I try to run a 
single query, such as selecting 1 row or deleting 1 row using the 
WHERE clause, the query can take forever to run.  In a specific case, 
it took 57 seconds to complete the SELECT query.

Any ideas on how to speed this up?
 
 
 
 
 



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



Re: Long Running Queries

2004-10-06 Thread Jason Williard
Amit,
You are awesome!  That fixed it quite nicely.  Our system is screaming 
now :-)

Thank You VERY MUCH!,
Jason Williard
Client Services

[EMAIL PROTECTED] wrote:
Do this and tell me if it helped
ALTER TABLE `asticketsdata` ADD INDEX ( `ticketidchar` ) 

Regards,
Amit
-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 1:42 AM
To: Wadhwa, Amit
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Long Running Queries

Thank you for your assistance with this.  Here's what you were asking
for.
Structure Output:
#
# Table structure for table 'asticketsdata'
#
CREATE TABLE asticketsdata (
   ticketdataid int(11) NOT NULL auto_increment,
   ticketidchar varchar(255) NOT NULL default '',
   ticketidno int(11) default NULL,
   contents text,
   emailbody text,
   PRIMARY KEY  (ticketdataid),
   KEY ticketdata1 (ticketidno)
) TYPE=MyISAM;
Query:
SELECT * FROM asticketsdata WHERE ticketidchar = 'IAZ-16393';
Thank You,
Jason Williard
Client Services

[EMAIL PROTECTED] wrote:
I have tables with millions of records.
1. I use Query-Caching and that speeds up all my selects/searches 
after the first time, no matter how complicated the criteria.
2. Build Indexes on the columns that are in your 'where' Criteria, 
that will help you big time.

If you post the table structure, and the query, I can help you with 
your index.

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 1:23 AM
To: Wadhwa, Amit
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Long Running Queries
I'm sorry to sound like a novice, but could you explain that?  Are you

recommending that I set the column I am searching to an Index?
Thank You,
Jason Williard
Client Services

[EMAIL PROTECTED] wrote:

You need Appropriate Indexes on the tables. 

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 1:11 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Long Running Queries
Hello,
I recently began experiencing issues that I would like some assistance

with.
Server Details:
- Windows 2003
- MySQL Max 4.0.20a
I have a table with 450,000+ records in it.  When I try to run a 
single query, such as selecting 1 row or deleting 1 row using the 
WHERE clause, the query can take forever to run.  In a specific case, 
it took 57 seconds to complete the SELECT query.

Any ideas on how to speed this up?






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


Re: Long Running Queries

2004-10-06 Thread Jason Williard
Before: 57 seconds
After: 1 second  :-D
Thank You,
Jason Williard
Client Services

Spenser wrote:
I wish we had thought to have had him benchmark a query before and after 
he added an index.  It would be interesting to see the difference in 
actual time that an index can make on a table with 450,000 records. 

On Wed, 2004-10-06 at 15:31, Jason Williard wrote:
/Amit,
You are awesome!  That fixed it quite nicely.  Our system is screaming 
now :-)

Thank You VERY MUCH!,
Jason Williard
Client Services

[EMAIL PROTECTED] wrote:
Do this and tell me if it helped
ALTER TABLE `asticketsdata` ADD INDEX ( `ticketidchar` ) 

Regards,
Amit
-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 1:42 AM
To: Wadhwa, Amit
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Long Running Queries

Thank you for your assistance with this.  Here's what you were asking
for.
Structure Output:
#
# Table structure for table 'asticketsdata'
#
CREATE TABLE asticketsdata (
   ticketdataid int(11) NOT NULL auto_increment,
   ticketidchar varchar(255) NOT NULL default '',
   ticketidno int(11) default NULL,
   contents text,
   emailbody text,
   PRIMARY KEY  (ticketdataid),
   KEY ticketdata1 (ticketidno)
) TYPE=MyISAM;
Query:
SELECT * FROM asticketsdata WHERE ticketidchar = 'IAZ-16393';
Thank You,
Jason Williard
Client Services

[EMAIL PROTECTED] wrote:
I have tables with millions of records.
1. I use Query-Caching and that speeds up all my selects/searches 
after the first time, no matter how complicated the criteria.
2. Build Indexes on the columns that are in your 'where' Criteria, 
that will help you big time.

If you post the table structure, and the query, I can help you with 
your index.

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 1:23 AM
To: Wadhwa, Amit
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Long Running Queries
I'm sorry to sound like a novice, but could you explain that?  Are you

recommending that I set the column I am searching to an Index?
Thank You,
Jason Williard
Client Services

[EMAIL PROTECTED] wrote:

You need Appropriate Indexes on the tables. 

-Original Message-
From: Jason Williard [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 1:11 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Long Running Queries
Hello,
I recently began experiencing issues that I would like some assistance

with.
Server Details:
- Windows 2003
- MySQL Max 4.0.20a
I have a table with 450,000+ records in it.  When I try to run a 
single query, such as selecting 1 row or deleting 1 row using the 
WHERE clause, the query can take forever to run.  In a specific case, 
it took 57 seconds to complete the SELECT query.

Any ideas on how to speed this up?





/

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


Re: Long Running Queries

2004-10-06 Thread Spenser
I wish we had thought to have had him benchmark a query before and after
he added an index.  It would be interesting to see the difference in
actual time that an index can make on a table with 450,000 records.  

On Wed, 2004-10-06 at 15:31, Jason Williard wrote:

 Amit,
 
 You are awesome!  That fixed it quite nicely.  Our system is screaming 
 now :-)
 
 Thank You VERY MUCH!,
 Jason Williard
 Client Services
 
 
 
 [EMAIL PROTECTED] wrote:
  Do this and tell me if it helped
  
  ALTER TABLE `asticketsdata` ADD INDEX ( `ticketidchar` ) 
  
  Regards,
  Amit
  
  -Original Message-
  From: Jason Williard [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, October 07, 2004 1:42 AM
  To: Wadhwa, Amit
  Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: Re: Long Running Queries
  
  Thank you for your assistance with this.  Here's what you were asking
  for.
  
  Structure Output:
  #
  # Table structure for table 'asticketsdata'
  #
  
  CREATE TABLE asticketsdata (
 ticketdataid int(11) NOT NULL auto_increment,
 ticketidchar varchar(255) NOT NULL default '',
 ticketidno int(11) default NULL,
 contents text,
 emailbody text,
 PRIMARY KEY  (ticketdataid),
 KEY ticketdata1 (ticketidno)
  ) TYPE=MyISAM;
  
  Query:
  SELECT * FROM asticketsdata WHERE ticketidchar = 'IAZ-16393';
  
  Thank You,
  Jason Williard
  Client Services
  
  
  
  [EMAIL PROTECTED] wrote:
  
 I have tables with millions of records.
 
 1. I use Query-Caching and that speeds up all my selects/searches 
 after the first time, no matter how complicated the criteria.
 2. Build Indexes on the columns that are in your 'where' Criteria, 
 that will help you big time.
 
 If you post the table structure, and the query, I can help you with 
 your index.
 
 -Original Message-
 From: Jason Williard [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 07, 2004 1:23 AM
 To: Wadhwa, Amit
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: Long Running Queries
 
 I'm sorry to sound like a novice, but could you explain that?  Are you
  
  
 recommending that I set the column I am searching to an Index?
 
 Thank You,
 Jason Williard
 Client Services
 
 
 
 [EMAIL PROTECTED] wrote:
 
 
 You need Appropriate Indexes on the tables. 
 
 -Original Message-
 From: Jason Williard [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 07, 2004 1:11 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Long Running Queries
 
 Hello,
 
 I recently began experiencing issues that I would like some assistance
 
 
 with.
 
 Server Details:
  - Windows 2003
  - MySQL Max 4.0.20a
 
 I have a table with 450,000+ records in it.  When I try to run a 
 single query, such as selecting 1 row or deleting 1 row using the 
 WHERE clause, the query can take forever to run.  In a specific case, 
 it took 57 seconds to complete the SELECT query.
 
 Any ideas on how to speed this up?
 
 
 
 
 
  
  
  
  
 


RE: Long Running Queries

2004-10-06 Thread Randy Clamons
Take a look at the docs for EXPLAIN (manual.html#IDX853). Use the 'possible_keys' 
column of the results to determine which column indexes will improve your query 
performance.

Make sure your table has a primary key. Whenever possible, use the primary key in your 
WHERE clause when you SELECT or UPDATE a single row.

You might get better results from this list if you include your table structure and 
your queries along with your question.

Randy Clamons
Systems Programming
Astro-auction.com

 Original Message
 From: Danny Willis [EMAIL PROTECTED]
 To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
 Date: Wed, Oct-6-2004 1:02 PM
 Subject: RE: Long Running Queries

 What do you mean by appropriate indexes?
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 06, 2004 3:43 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: Long Running Queries
 
 You need Appropriate Indexes on the tables. 
 
 -Original Message-
 From: Jason Williard [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 07, 2004 1:11 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Long Running Queries
 
 Hello,
 
 I recently began experiencing issues that I would like some assistance
 with.
 
 Server Details:
   - Windows 2003
   - MySQL Max 4.0.20a
 
 I have a table with 450,000+ records in it.  When I try to run a single
 query, such as selecting 1 row or deleting 1 row using the WHERE 
 clause,
 the query can take forever to run.  In a specific case, it took 57
 seconds to complete the SELECT query.
 
 Any ideas on how to speed this up?
 -- 
 
 Thank You,
 Jason Williard


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



long running queries

2001-09-20 Thread Michael Blood

Occasionally I have to add an index on a table with almost 2M rows and it
takes a long time. This is expected but when adding the index it seems to
block all other queries from other users from executing.
Is there a way to prevent this?

Thanks
Michael Blood


-
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