Sep 16, 2013

Oracle

Let us ponder about indexes in this post.

What has to be the order of the columns when creating a composite index?

Where should the most used column and the least used column come?

Will a query not using the last column use the index?

Will a query not using the leading column use the index?

Why do you make an index unusable?

Why do you make an index invisible?



Ref:

http://docs.oracle.com/cd/E11882_01/server.112/e25789/indexiot.htm

Mview:

- Can Oracle view be updated?
- Refresh on Demand / Commit

Partitions:

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/vldbg/create-composite-partition-table.html#GUID-7854B907-B11C-41A6-A7AC-E01D063198B6


Rows to columns: http://stackoverflow.com/questions/5301613/inverse-row-to-column

EVALUATE('db_function(%1...%N)' [AS datatype] [, column1, columnN])

CAST(EVALUATE_AGGR('listagg (%1,%2) within group (order by %1 ASC)' , "Organization Detail"."Inventory Org",',') AS char(500))

One another Example:
EVALUATE('RANK() OVER (PARTITION BY %2 ORDER BY %1 desc)' AS INTEGER , "- Fact - Purchase Invoice"."Invoice Amt","- Dim – Organization"."Inventory Org")

No comments:

Post a Comment