Re: MySQL Performance or Just me? :(
Posted by:
ernest
Date: July 28, 2005 08:13AM
Tobin Harris wrote:
> You should paste your query here for us to see.
SELECT tableA.*, tableB.*, Count(DISTINCT tableA.session_id_initial) AS CountOfDistinctSII, SUM(tableA.visit_duration) AS CountOfVisitDuration, SUM(CASE WHEN session_state='n' THEN 1 ELSE 0 END) AS CountOfSessions, Count(tableA.pid) AS CountOfPID FROM tableB INNER JOIN tableA ON tableB.pid_id = tableA.pid WHERE (((tableA.datestamp)>='06-01-2005') AND ((tableA.datestamp)<='07-01-2005')) GROUP BY tableB.fullname
>
> Have you run an EXPLAIN on the query to see if
> it's using an index? For example:
>
> EXPLAIN select * from mytable where col = 'hello'
>
After running EXPLAIN, I got the following:
table type possible_keys key key_len ref rows Extra
tableB ALL NULL NULL NULL NULL 117 Using temporary; Using filesort
tableA ALL NULL NULL NULL NULL 434836 Using where
Subject
Views
Written By
Posted
2695
July 27, 2005 11:53PM
1758
July 28, 2005 01:08AM
Re: MySQL Performance or Just me? :(
1877
July 28, 2005 08:13AM
1832
July 28, 2005 08:32AM
1747
July 28, 2005 05:50PM
1697
July 29, 2005 02:00AM
1933
July 29, 2005 05:28AM
1408
July 29, 2005 06:52AM
1650
July 29, 2005 07:11AM
2016
July 29, 2005 07:36AM
1845
July 29, 2005 08:43AM
1766
July 29, 2005 12:30PM
Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.