schema optimization
Posted by: dileep ch
Date: July 19, 2012 03:29AM

hi,

we are using a table event_logs, there are 24 columns in that table, by looking at columns can you say we normalize the table by splitting the columns.

Most of the queries are slow, We already have indexes for all queries.

+----------------+------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+------------+------+-----+---------------------+----------------+
| id | bigint(20) | NO | PRI | NULL | auto_increment |
| event_id | int(11) | NO | MUL | NULL | |
| session_id | bigint(20) | NO | | NULL | |
| param1 | int(11) | NO | MUL | NULL | |
| param2 | int(11) | NO | MUL | NULL | |
| param3 | int(11) | NO | MUL | NULL | |
| param4 | int(11) | NO | MUL | NULL | |
| param5 | int(11) | NO | MUL | NULL | |
| param6 | int(11) | NO | MUL | NULL | |
| param7 | int(11) | NO | MUL | NULL | |
| param8 | int(11) | NO | MUL | NULL | |
| lat | float | NO | | 0 | |
| longi | float | NO | | 0 | |
| country_id | int(11) | NO | | NULL | |
| ip | int(32) | NO | | NULL | |
| cdate | date | NO | PRI | NULL | |
| ctime | time | NO | | NULL | |
| cts | timestamp | NO | | 0000-00-00 00:00:00 | |
| os_version | int(11) | NO | | NULL | |
| app_version | int(11) | NO | | NULL | |
| device_version | int(11) | NO | | NULL | |
| udid | int(11) | NO | | NULL | |
| jail_broken | tinyint(4) | NO | | 0 | |
| jail_broken2 | tinyint(4) | NO | | 0 | |
+----------------+------------+------+-----+---------------------+----------------

I would like to move lat,longi,ip,os_version,app_version,device_version itto another table.

Is it correct one to do to make the query easier.

The table contains 4 crore records.

Options: ReplyQuote


Subject
Written By
Posted
schema optimization
July 19, 2012 03:29AM
July 19, 2012 11:30AM
July 23, 2012 12:56PM


Sorry, you can't reply to this topic. It has been closed.

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.