> I have two tables and am running a simple join between them to get
> questions and their repsective response averages from a survey.  The
> question table has 49 rows and the Response table has 126,732.  I'd like
> cut down on the time its taking to run this specific i'll be
> running many like it to generate reports. The query below is the selecting
> the most data, normally this will be limited to specific groups by joining
> more tables.
> I am executing the following query
> SELECT Question.Text_Long, AVG( Response ) FROM `Response` INNER JOIN
> Question ON Question.Question_Key = Response.Question_Key WHERE
> Question.Question_Key LIKE '2003%' GROUP BY Response.Question_Key ORDER BY
> Question.Question_Key ASC

What does EXPLAIN tell you for this query? Is it using your indexes?

---John Holmes...

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to