[jira] Updated: (DAYTRADER-25) Update decimal precision and indexes in ddl

2006-12-06 Thread Christopher James Blythe (JIRA)
 [ http://issues.apache.org/jira/browse/DAYTRADER-25?page=all ]

Christopher James Blythe updated DAYTRADER-25:
--

Attachment: daytrader-25.code.patch

This patch updates the quote price change algorithm to that described in my 
previous comments.

The change factor varies between +/- 20% and if stock prices reach a value 
greater than $400, the price is cut in half.

> Update decimal precision and indexes in ddl
> ---
>
> Key: DAYTRADER-25
> URL: http://issues.apache.org/jira/browse/DAYTRADER-25
> Project: DayTrader
>  Issue Type: Improvement
>Reporter: Christopher James Blythe
>Priority: Minor
> Attachments: daytrader-25.code.patch, daytrader-25.schema.patch
>
>
> While working with previous versions of Trade, I found that the monetary 
> values stored in the database could overrun the decimal precision defined in 
> the schema (10,2) if allowed to run for an extended period of time. This 
> would result in SQL exceptions related to data conversion.
> To prevent this we increased the decimal presion to (14,2)
> We also found that some of the indexs were not necessary and that others 
> should be added.
> In addition to the primary keys, here are the indexes we found to be the most 
> useful...
> CREATE INDEX a.profile_userid on accountejb(profile_userid);
> CREATE INDEX h.account_accountid on holdingejb(account_accountid);
> CREATE INDEX o.account_accountid on orderejb(account_accountid);
> CREATE INDEX o.holding_holdingid on orderejb(holding_holdingid);
> CREATE INDEX o.closed_orders on orderejb(account_accountid,orderstatus);
> Will wait to submit a patch until the fate of Daytrader-14 is determined.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (DAYTRADER-25) Update decimal precision and indexes in ddl

2006-12-06 Thread Christopher James Blythe (JIRA)
 [ http://issues.apache.org/jira/browse/DAYTRADER-25?page=all ]

Christopher James Blythe updated DAYTRADER-25:
--

Attachment: daytrader-25.schema.patch

Here is a patch to fix the schema files associated with DT-14 (built against 
the 1.2 branch).

This updates the indexes and the decimal precision.

> Update decimal precision and indexes in ddl
> ---
>
> Key: DAYTRADER-25
> URL: http://issues.apache.org/jira/browse/DAYTRADER-25
> Project: DayTrader
>  Issue Type: Improvement
>Reporter: Christopher James Blythe
>Priority: Minor
> Attachments: daytrader-25.schema.patch
>
>
> While working with previous versions of Trade, I found that the monetary 
> values stored in the database could overrun the decimal precision defined in 
> the schema (10,2) if allowed to run for an extended period of time. This 
> would result in SQL exceptions related to data conversion.
> To prevent this we increased the decimal presion to (14,2)
> We also found that some of the indexs were not necessary and that others 
> should be added.
> In addition to the primary keys, here are the indexes we found to be the most 
> useful...
> CREATE INDEX a.profile_userid on accountejb(profile_userid);
> CREATE INDEX h.account_accountid on holdingejb(account_accountid);
> CREATE INDEX o.account_accountid on orderejb(account_accountid);
> CREATE INDEX o.holding_holdingid on orderejb(holding_holdingid);
> CREATE INDEX o.closed_orders on orderejb(account_accountid,orderstatus);
> Will wait to submit a patch until the fate of Daytrader-14 is determined.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira