> I've put an index on date and symbol combined,
> and tried putting one on just date.
Did you then do an "EXPLAIN ..." before your query
to see the results?
> select min(date) from stockmarket where symbol='abc'
explain select min(date) from stockmarket ...
That will tell you if your indexes are being used.
Also, you might want to consider keeping a seperate
table for lows and highs at a different period, or keeping
them in the same table and adding a period field. Then,
at that (longer) period, run the query and insert that data
so that you have it available.
INSERT INTO WeeklyMarket (mindate) SELECT MIN(date) FROM ...
... assuming that's what you want to do.
--
Michael T. Babcock
---------------------------------------------------------------------
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