 	constraint fk_mapID foreign key (mapId) references map on delete cascade
 );
 
+create index element_mapid_elementid on element(mapId,elementId);
+
 --# These don't work with installer
-alter table element add	constraint pk_element primary key (mapId,elementId);
-alter table element add constraint elementid check (elementid <> 0);
+--#alter table element add	constraint pk_element primary key (mapId,elementId);
+--#alter table element add constraint elementid check (elementid <> 0);
 
 --# Sequence for the eventID column in the events table
 --#          sequence,   column, table

);

--# this doesn't wor with installer 
alter table stpinterface add constraint pk_stpinterface primary key (nodeid,bridgeport,stpvlan);

create index stpinterface_node_ifindex_idx on stpinterface(nodeid,ifindex);
create index stpinterface_node_idx on stpinterface(nodeid);
create index stpinterface_stpvlan_idx on stpinterface(stpvlan);

);

--# this doesn't wor with installer 
--#alter table stpnode add constraint pk_stpnode primary key (nodeid,basevlan);

create index stpnode_nodeIdBaseVlan_idx on stpnode(nodeid,basevlan);
create index stpnode_baseBridgeAddress_idx on stpnode(baseBridgeAddress);
create index stpnode_stpdesignatedroot_idx on stpnode(stpdesignatedroot);

