Hi Irek,
Thanks again for your reply.
Why is a cross join being used? That would explain the output of the EXPLAIN command although I thought it was using an inner join when the ON / WHERE conditions were added to it?
Maybe I am confused at how to use the join properly in this instance. I'll explain exactly what I want todo and hopefully you can tell me the correct way todo it.
All I am looking todo is combine the stock data in each of the 4 tables for the given dates. There should only be ~6000 results in total when the join is performed (when it eventually returns it has this many).
To achieve this not using the sql join what i do is as follows.
Load all stockssymbols ~6000 rows
Load part fastocksdata where loadedTime = ? ~6000
Load part pricerelated where loadedTimeTA = ? ~6000
Load part indicators where loadedTimeTA = ? ~6000
so now i have four result sets in memory with 6000 rows each (~5MB).
I then simply combine these results together based on the stocksymbol column which is unique in each resultset. That gives me a combined total of ~6000 rows.
This all works in milliseconds.
Do i need to do four separate queries and then join the results of them together in sql somehow or is my join syntax all wrong considering it is using a cross join?
Thanks again,
Will