Re: Optimizing Queries (specifically with LIMIT)

2004-05-30 Thread Daniel Clark
I found it interesting. Thanks Eric. (reconstructed from archives i accidentally deleted the copy in my mailbox Daniel Clark writes: I don't see how LIMIT would make a difference. LAST_INSERT_ID() only returns one record. But it's worth trying in a big loop to get timing numbers. Well, I

Re: Optimizing Queries (specifically with LIMIT)

2004-05-29 Thread Michael Stassen
LAST_INSERT_ID is connection-specific, not table-specific. When you say, SELECT LAST_INSERT_ID() FROM foo; you are asking for the LAST_INSERT_ID to be repeated once for each row of table foo. This is analogous to SELECT NOW() FROM foo; or SELECT 2 FROM foo; Adding a LIMIT would work, but

Re: Optimizing Queries (specifically with LIMIT)

2004-05-29 Thread Daniel Clark
I don't see how LIMIT would make a difference. LAST_INSERT_ID() only returns one record. But it's worth trying in a big loop to get timing numbers. I have a rather simple straightforward question that I was not able to find in any of the documentation. I am in the process of writing an

Re: Optimizing Queries (specifically with LIMIT)

2004-05-29 Thread Eric Absgarten
(reconstructed from archives i accidentally deleted the copy in my mailbox Daniel Clark writes: I don't see how LIMIT would make a difference. LAST_INSERT_ID() only returns one record. But it's worth trying in a big loop to get timing numbers. Well, I decided to test this all out and see what

RE: Optimizing Queries

2004-03-09 Thread Donny Simonton
Chris, Is it faster if you remove the 'IS NOT NULL'? I know that's not the results you want, but we have found that is NOT NULL will do a full scan. But we normally use it with a join. Since you are using one table, I'm not sure how it would affect it. Donny -Original Message- From:

Re: Optimizing Queries

2004-03-09 Thread Richard Davey
Hello Chris, Tuesday, March 9, 2004, 4:38:00 PM, you wrote: CF I'm trying to determine the best way to optimize the query below. Right now CF it is taking around 9mins and we need it to take no more than 30 seconds (we CF can get it under 30s on MS SQL): CF | 1 | SIMPLE | speedlink | ref

RE: Optimizing Queries

2004-03-09 Thread Erich Beyrent
Chris, Is it faster if you remove the 'IS NOT NULL'? I know that's not the results you want, but we have found that is NOT NULL will do a full scan. But we normally use it with a join. Since you are using one table, I'm not sure how it would affect it. Donny This is an interesting

RE: Optimizing Queries

2004-03-09 Thread Chris Fossenier
Why does it only use the one index? Chris. -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 11:00 AM To: [EMAIL PROTECTED] Subject: Re: Optimizing Queries Hello Chris, Tuesday, March 9, 2004, 4:38:00 PM, you wrote: CF I'm trying

RE: Optimizing Queries

2004-03-09 Thread Chris Fossenier
: Tuesday, March 09, 2004 11:00 AM To: [EMAIL PROTECTED] Subject: Re: Optimizing Queries Hello Chris, Tuesday, March 9, 2004, 4:38:00 PM, you wrote: CF I'm trying to determine the best way to optimize the query below. CF Right now it is taking around 9mins and we need it to take no more CF than 30

RE: Optimizing Queries

2004-03-09 Thread Donny Simonton
:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 11:00 AM To: [EMAIL PROTECTED] Subject: Re: Optimizing Queries Hello Chris, Tuesday, March 9, 2004, 4:38:00 PM, you wrote: CF I'm trying to determine the best way to optimize the query below. CF Right now it is taking around 9mins and we

Re: Optimizing Queries

2001-02-19 Thread Tõnu Samuel
Jim Bayers wrote: I have a non-profit site that uses mysql. I need to optimize two queries so they won't put such a load on the mysql server. If I don't lighten the load, they've treatened to kick us off. Check the manual chaper about optimizations, especially about EXPLAIN command. This