RE: [PATCH] DDL of oracle changed to primary keys, added some indexe s

"Tim Anderson" <[email protected]> Sun, 2 May 2004 11:35:38 +1000
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
Michael,
    could you raise an bug report or RFE as per
http://openjms.sourceforge.net/devguide/submit.html
so these don't get lost?

Thanks,

Tim

> -----Original Message-----
> From: openjms-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> [mailto:openjms-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]On Behalf Of
> Michael Jaszczyk
> Sent: Thursday, 15 April 2004 4:18 AM
> To: 'openjms-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org'
> Subject: [openjms-developer] [PATCH] DDL of oracle changed to primary
> keys, added some indexe s
> 
> 
> Index: create_oracle.sql
> ===================================================================
> RCS file: /cvsroot/openjms/openjms/src/config/db/create_oracle.sql,v
> retrieving revision 1.3
> diff -u -r1.3 create_oracle.sql
> --- create_oracle.sql	3 Jan 2004 03:31:57 -0000	1.3
> +++ create_oracle.sql	14 Apr 2004 17:41:38 -0000
> @@ -4,14 +4,23 @@
>    version                varchar2(20) not null,
>    creationDate           date not null
>  );
> -create unique index system_data_pk on system_data(id);
> +alter table system_data
> +	add constraint system_data_pk
> +	primary key ( id )
> +	using index;
> +
> +
>  
>  drop table seeds;
>  create table seeds (
>    name                   varchar2(20) not null,
>    seed                   NUMBER(28) not null
>  );
> -create unique index seeds_pk on seeds(name);
> +alter table seeds
> +	add constraint seeds_pk
> +	primary key ( name )
> +	using index;
> +
>  
>  drop table destinations;
>  create table destinations (
> @@ -19,7 +28,10 @@
>    isQueue                NUMBER(3) not null,
>    destinationId          NUMBER(28) not null
>  );
> -create unique index destinations_pk on destinations(name);
> +alter table destinations
> +	add constraint destinations_pk
> +	primary key ( name )
> +	using index;
>  
>  drop table messages;
>  create table messages (
> @@ -29,9 +41,21 @@
>    createTime            NUMBER(28) not null,
>    expiryTime            NUMBER(28),
>    processed             NUMBER(3),
> -  messageBlob           LONG raw not null
> +  messageBlob           BLOB not null
> +);
> +
> +alter table messages
> +	add constraint messages_pk
> +	primary key ( messageid )
> +	using index;
> +
> +create index messages_x1 on messages(
> +	EXPIRYTIME
> +);
> +
> +create index messages_x2 on messages(
> +	DESTINATIONID
>  );
> -create index messages_pk on messages(messageId);
>  
>  DROP TABLE message_handles;
>  CREATE TABLE message_handles (
> @@ -44,7 +68,16 @@
>     expiryTime           NUMBER(28),
>     delivered            NUMBER(3)
>  );
> -CREATE INDEX message_handles_pk ON message_handles(destinationId,
> consumerId, messageId);
> +
> +alter table message_handles
> +	add constraint message_handles_pk
> +	primary key ( destinationId, consumerId, messageId )
> +	using index;
> +create index message_handles_x1 on message_handles(expirytime);
> +create index message_handles_x2 on message_handles(messageid);
> +create index message_handles_x3 on message_handles(destinationid);
> +create index message_handles_x4 on
> message_handles(consumerid,acceptedtime);
> +
>  
>  drop table consumers;
>  create table consumers (
> @@ -53,11 +86,18 @@
>    consumerId           NUMBER(28) not NULL,
>    created              NUMBER(28) NOT NULL
>  );
> -create unique index consumers_pk on consumers(name, destinationId);
> +alter table consumers
> +	add constraint consumers_pk
> +	primary key ( name, destinationid )
> +	using index;
> +
>  
>  drop table users;
>  create table users (
>    username             varchar2(50) not null,
>    password             varchar2(50) not null
>  );
> -create unique index users_pk on users(username);
> \ No newline at end of file
> +alter table users
> +	add constraint users_pk
> +	primary key ( username )
> +	using index;
> Index: src/config/db/create_oracle.patch
> ===================================================================
> RCS file: src/config/db/create_oracle.patch
> diff -N src/config/db/create_oracle.patch
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ src/config/db/create_oracle.patch	1 Jan 1970 00:00:00 -0000
> @@ -0,0 +1,18 @@
> +Index: create_oracle.sql
> +===================================================================
> +RCS file: /cvsroot/openjms/openjms/src/config/db/create_oracle.sql,v
> +retrieving revision 1.2
> +diff -u -w -i -b -r1.2 create_oracle.sql
> +--- create_oracle.sql	23 Oct 2003 13:42:47 -0000	1.2
> ++++ create_oracle.sql	5 Jan 2004 09:22:54 -0000
> +@@ -32,6 +32,10 @@
> +   messageBlob           LONG raw not null
> + );
> + create index messages_pk on messages(messageId);
> ++create index messages_x1 on messages(
> ++	EXPIRYTIME,
> ++	DESTINATIONID
> ++);
> + 
> + DROP TABLE message_handles;
> + CREATE TABLE message_handles (
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> openjms-developer mailing list
> openjms-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/openjms-developer
> 



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click