RE: Indexing? (Warning: relative newbie.)

2009-06-26 Thread Ken D'Ambrosio
After a few off-list e-mails with Tim, I issued ALTER TABLE dbmail_messageblks ADD INDEX ( blocksize AND physmessage_id ); which took almost 11 hours to index. Once done, however, my select statement went from a hair over 50 minutes to 15 seconds. (1.69 seconds after the index was cached.)

Re: Indexing? (Warning: relative newbie.)

2009-06-26 Thread Shawn Green
Hi Walter, Walter Heck - OlinData.com wrote: Hey Tim, all On Wed, Jun 24, 2009 at 10:03 AM, Little, Timothytlit...@thomaspublishing.com wrote: Why, you might ask, index on physmessage_id? Because then the db won't have to do a fetch on items from the table since it's in the INDEX itself,

RE: Indexing? (Warning: relative newbie.)

2009-06-24 Thread Little, Timothy
To answer your questions in no particular order, YES you can speed it up with indexing. You might want to first create an index on ( blocksize AND physmessage_id ). Why, you might ask, index on physmessage_id? Because then the db won't have to do a fetch on items from the table since it's in

Re: Indexing? (Warning: relative newbie.)

2009-06-24 Thread Walter Heck - OlinData.com
Hey Tim, all On Wed, Jun 24, 2009 at 10:03 AM, Little, Timothytlit...@thomaspublishing.com wrote: Why, you might ask, index on physmessage_id?  Because then the db won't have to do a fetch on items from the table since it's in the INDEX itself, saving any unnecessary reads. FYI: That only