Hi,
I'm trying to optimize the following query:
SELECT *
FROM user LEFT JOIN history ON user.userid = history.touserid OR
user.userid = history.fromuserid
WHERE user.state = 'ready'
GROUP BY user.userid
This causes a full table scan on the second table. If I do the following
however the index is
Hi,
I'm trying to do a SELECT which then counts records in two separate
tables, eg:
SELECT a_id, count(b_id) FROM a LEFT JOIN b USING(a_id)
merged with
SELECT a_id, count(c_id) FROM a LEFT JOIN c USING(a_id)
So you would end up with
a_id, count(b_id), count(c_id)
Showing the number of records l
Hi,
I've been migrating an MS Access database from Access to use a MySQL
linked-table backend. Most problems have been fixed by the advice on the
MyODBC FAQ and other resources but I am having trouble with a sub form
to which I cannot find an answer...
The database is a customers/stock/orders da