[
http://opencast.jira.com/browse/MH-8854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=30819#comment-30819
]
David Horwitz commented on MH-8854:
-----------------------------------
the following:
alter table user_action change type type varchar(255);
alter table user_action change session_id session_id varchar(255);
create index user_action_session_id on user_action(session_id);
create index user_action_type on user_action(type);
improves the query performance to:
mysql> describe SELECT id AS id1, user_ip AS user_ip2, outpoint AS outpoint3,
inpoint AS inpoint4, mediapackage_id AS mediapackage_id5, session_id AS
session_id6, created AS created7, user_id AS user_id8, length AS length9, type
AS type10, is_playing AS is_playing11 FROM user_action WHERE ((session_id =
'1oqq13a558xur') AND (type = 'FOOTPRINT')) ORDER BY created DESC LIMIT 0, 1;
+----+-------------+-------------+------+-----------------------------------------+------------------------+---------+-------+------+-----------------------------+
| id | select_type | table | type | possible_keys
| key | key_len | ref | rows | Extra
|
+----+-------------+-------------+------+-----------------------------------------+------------------------+---------+-------+------+-----------------------------+
| 1 | SIMPLE | user_action | ref |
user_action_session_id,user_action_type | user_action_session_id | 768 |
const | 1 | Using where; Using filesort |
+----+-------------+-------------+------+-----------------------------------------+------------------------+---------+-------+------+-----------------------------+
1 row in set (0.00 sec
> user_action table definition leads to ineficient queries on mysql
> -----------------------------------------------------------------
>
> Key: MH-8854
> URL: http://opencast.jira.com/browse/MH-8854
> Project: Matterhorn Project
> Issue Type: Bug
> Components: Architecture & Services
> Affects Versions: 1.2
> Reporter: David Horwitz
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
http://opencast.jira.com/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn
To unsubscribe please email
[email protected]
_______________________________________________