[openstack-dev] [Ceilometer] A DB question for UniqueName/Event/Trait
Jay Pipes
jaypipes at gmail.com
Mon Jun 24 11:17:50 UTC 2013
On 06/24/2013 04:49 AM, Wang, Shane wrote:
> Hi
>
> I am looking at ceilometer DB code. I find there are 3 tables (UniqueName, Event, Trait), and in Trait, the two columns "name_id" and "event_id" refer to table UniqueName and table Event.
>
> My question is why we need UniqueName and Event, because in both tables there are no many other columns, so why not fill unique_name into Trait directly.
>
> Thanks in advance.
Hi Shane,
The purpose of the separate UniqueName table, IIRC, is to reduce the
footprint of the main Event and Trait tables. A smaller integer foreign
key can be used instead of a larger string key.
Best,
-jay
More information about the OpenStack-dev
mailing list