Re: Database design for monitoring tool
Posted by: Rick James
Date: May 24, 2012 10:11PM

> This is declared at the table creation, right? Not in the query.
Correct. INDEX creation is done either at CREATE TABLE time, or can be applied later, with ALTER TABLE. Caution: ALTER will read and recreate the entire table, so ALTERing a multi-GB table will take hours.

mysql> SELECT LEFT(NOW(), 7) JustMo, LEFT(NOW(), 13) ThruHr;
+---------+---------------+
| JustMo  | ThruHr        |
+---------+---------------+
| 2012-05 | 2012-05-24 21 |
+---------+---------------+
(etc)

Options: ReplyQuote


Subject
Written By
Posted
Re: Database design for monitoring tool
May 24, 2012 10:11PM


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.