Re: select query optimization

2002-04-10 Thread Benjamin Pflugmann
Hi. As I said, or at least, tried to say, a key over all used columns should help. Adding the column from ORDER BY avoids the "using filesort". Adding YIADDR (which I simply overlooked last time) should add "using index", as I mentioned. This means, that the data file is not touched at all, but o

Re: select query optimization

2002-04-10 Thread Steve Katen
ben, I did that about three minutes after I got Davids email. Things seem to be working a lot faster now, and the "using filesort" is gone. i am assuming there isn't much more i can do to make this thing faster, but anything else i can do would be awesome! heres is the explain: mysql> expla

Re: select query optimization

2002-04-10 Thread Benjamin Pflugmann
Hi. (I am replying to the wrong mail, because I already delete the one from Steve...) The slow part is probably the "using filesort". I am not sure, if it will work, but try a key over all used column, i.e. INDEX ( POOL, STATE, TIMESTAMP ) If it works (i.e. if MySQL correctly "sees" that it ca

RE: select query optimization

2002-04-10 Thread Lopez David E-r9374c
Katen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 8:47 AM To: Lopez David E-r9374c; [EMAIL PROTECTED] Subject: RE: select query optimization i made the change, but it looks like it didn't speed the query up at all. here are the results from the first explain: mysql> e

RE: select query optimization

2002-04-10 Thread Steve Katen
i made the change, but it looks like it didn't speed the query up at all. here are the results from the first explain: mysql> explain select TIME_STAMP, YIADDR from RADPOOL where STATE=0 and POOL='GLOBAL-POOL-SJC' ORDER BY TIME_STAMP limit 1; +-+--+---+---

RE: select query optimization

2002-04-10 Thread Lopez David E-r9374c
Katen Try using a compound index with STATE and POOL INDEX ipoolstate( POOL, STATE ) Use EXPLAIN SELECT to see what mysql thinks. David PS anybody know if KEY is the same as INDEX? -Original Message- From: Steve Katen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 8

RE: select query optimization

2002-04-03 Thread Lopez David E-r9374c
Steve Have you tried using compound index: INDEX( POOL, STATE ) Just a thought. David -Original Message- From: Steve Katen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 10:13 AM To: [EMAIL PROTECTED] Subject: select query optimization i am running a basic install of m