Tuesday, April 29, 2008

Data Model

MDSYS.SDO_GEOMETRY
http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14255/sdo_objrelschema.htm#i1004087

PL/SQL DATE CONVERT TO NUMBER
http://www.unix.org.ua/orelly/oracle/prog2/ch14_01.htm
http://www.unix.org.ua/orelly/oracle/prog2/ch14_02.htm
eg.
number_date := TO_NUMBER(TO_CHAR(date, 'j'));

Function-Based Indexes
http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_indexing.htm#sthref597
Any top-level or package-level PL/SQL functions that are used in the index expression must be declared as DETERMINISTIC. That is, they always return the same result given the same input, for example, the UPPER function. You must ensure that the subprogram really is deterministic, because Oracle Database does not check that the assertion is true.

If you change the semantics of a DETERMINISTIC function and recompile it, then existing function-based indexes and materialized views report results for the prior version of the function. Thus, if you change the semantics of a function, you must manually rebuild any dependent function-based indexes and materialized views.

Thursday, January 17, 2008

One efficient side of Gen2

There are two major command using by Gen2, which are QueryAdjust and QueryRep. Specifically, these two commands are used by Reader. Also, as we may find out that Reader's transmission rate is 4 times slower than Tags' rate.
So the length of these two commonly using commands becomes critical in performance when doing time measurement.

Gen2 does very well in shortening their length:
QueryRep >> command type(2 bits) + Session (2 bits) = 4 bits
QueryAdjust >> command type(4 bits) + Session (2 bits) + Up or Down (3 bits) = 9 bits

There is only two 2 bits long command types, one is QueryRep, as it uses every time to order tags to downcounter by 1. Base on performance of Gen2, averagely, every tag needs 3 query rounds to be identified. So if there is 1000 tags, QueryRep is sent 3000 times roughly.

QueryAdjust is used to change the value of Q in the Q-algorithm. Instead of telling the value of Q directly in its command, it only tells how to change its value, as Q is changed step by step, one by one.

This efficient side of Gen2 compensates the upper limit performance of Aloha algorithm. These two succinct command lines reduce huge time in the whole process.