create table logs (
	logid serial primary key,
	ctime integer not null,
	stime integer not null,
	itime integer not null,
	agentid integer not null,
	subagentid integer not null,	
	ownerid integer not null,	
	hostid integer not null,	
	appname varchar(64) default null,	
	logbody varchar(1024) not null
);

create index ctime_ndx on logs using btree (ctime);
create index stime_ndx on logs using btree (stime);
create index itime_ndx on logs using btree (itime);
create index agentid_ndx on logs using hash (agentid);
create index ownerid_ndx on logs using hash (ownerid);
create index hostid_ndx on logs using hash (hostid);
