Bug #7676 Some queries not using indexes
Submitted: 5 Jan 2005 4:31 Modified: 3 Mar 2005 17:03
Reporter: Donny Simonton Email Updates:
Status: Closed Impact on me:
None 
Category:Eventum Severity:S3 (Non-critical)
Version:1.4 OS:Linux (Linux)
Assigned to: Bryan Alsdorf CPU Architecture:Any

[5 Jan 2005 4:31] Donny Simonton
Description:
SELECT
iss_id,
iss_summary
FROM
eventum.issue
WHERE
iss_duplicated_iss_id=15;

Can be fixed by adding.
ALTER TABLE `issue` ADD INDEX ( `iss_duplicated_iss_id` )

Also this one as well,

SELECT ttr_id, ttr_created_date, ttr_summary, ttr_time_spent, ttc_title, ttr_usr_id, usr_full_name
FROM eventum.time_tracking, eventum.time_tracking_category, eventum.user
WHERE ttr_ttc_id = ttc_id
AND ttr_usr_id = usr_id
AND ttr_iss_id =15
ORDER BY ttr_created_date ASC 

By adding, ALTER TABLE `time_tracking` ADD INDEX ( `ttr_iss_id` )  this one goes away as well.

Both of these are based on the latest code release today, and are only showing up because they are not using indexes, not that they are slow.

Donny

How to repeat:
See above.

Suggested fix:
Add code to add additional indexes.
[3 Mar 2005 17:03] Bryan Alsdorf
Indexes added in Bitkeeper, and will be in the Eventum 1.5.1 release.