{"action":"opened","issue":{"url":"https://api.github.com/repos/PredictionIO/PredictionIO/issues/159","labels_url":"https://api.github.com/repos/PredictionIO/PredictionIO/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/PredictionIO/PredictionIO/issues/159/comments","events_url":"https://api.github.com/repos/PredictionIO/PredictionIO/issues/159/events","html_url":"https://github.com/PredictionIO/PredictionIO/issues/159","id":112994232,"number":159,"title":"Could I change data type of JDBC event table?","user":{"login":"schon","id":1387273,"avatar_url":"https://avatars.githubusercontent.com/u/1387273?v=3","gravatar_id":"","url":"https://api.github.com/users/schon","html_url":"https://github.com/schon","followers_url":"https://api.github.com/users/schon/followers","following_url":"https://api.github.com/users/schon/following{/other_user}","gists_url":"https://api.github.com/users/schon/gists{/gist_id}","starred_url":"https://api.github.com/users/schon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schon/subscriptions","organizations_url":"https://api.github.com/users/schon/orgs","repos_url":"https://api.github.com/users/schon/repos","events_url":"https://api.github.com/users/schon/events{/privacy}","received_events_url":"https://api.github.com/users/schon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-23T10:30:19Z","updated_at":"2015-10-23T10:30:19Z","closed_at":null,"body":"I use mysql as a event table for some reasons.\r\nLEventStore.findByEntity function with entityType and entityId is slow and sometimes I am getting java.util.concurrent.TimeoutException.\r\nI want to create index on this columns to improve performance.\r\n\r\nhttps://github.com/PredictionIO/PredictionIO/blob/65a64c902ad7671dfb2fb0e29d8af806a01c55d0/data/src/main/scala/io/prediction/data/storage/jdbc/JDBCLEvents.scala#L43-L56\r\n\r\nSo, I modified these columns after creating table in my scripts such as below.\r\n\r\n```\r\nalter table pio_event_1_1 modify column entityType varchar(10) not null;\r\nalter table pio_event_1_1 modify column entityId varchar(255) not null;\r\ncreate index pio_event_1_1_idx1 on pio_event_1_1 (entityId);\r\ncreate index pio_event_1_1_idx2 on pio_event_1_1 (entityType);\r\n```\r\n\r\nIs there any more good way for this situation?\r\n"}}