Performance of Top Link with clustering

Hi,
We are planning to use Top Link with a J2EE app that will reside on Oracle 9i app server. We are also planning to use clustering of app server. So we will need to configure Top Link ServerSessions accordingly (isnt it?).
Do you think the performance of TopLink will be reduced badly if used in this fashion, since the server sessions have to talk to each other continuously !
Thanks,
Krishna

Krishna,
The Cache-Sync feature of TopLink is an excellent way to minimize stale data. The messaging and change-set propagation does not come without a cost though. Typically we try to recommend this for customers with a high percentage of reads. In these cases it is more beneficial to keep the cache and avoid trips to the database.
There is no magic formula for when to use cache-sync. The messaging cost/efficiency is dependent on the mechanism (point to point over RMI/CORBA/IIOP or JMS), the size of the change sets or complexity of transaction, number of servers in the cluster, etc.
What is important to understand though is that cache-sync is just one way to minimize stale cache. It does not ensure you won't have stale data. For this you must configure a locking strategy and adjust your cache relative to the expected life-span you need on cached objects.
For a system like your I would recommend starting out without cache-sync. Use optimistic locking on all classes and use a weak cache for all classes that have a high occurrence of writes. For the rest I would recommend a Full cache on static/reference data and a soft-weak cache on those that fall in between. The size of the soft-weak cache will determine the number of objects potentially held (LRU) beyond their use.
With these settings you should be able to monitor and account for changes made to stale objects through OptimisticLockExceptions. If you find specific use-cases that are prone to failure you could force the refresh on the query at the start of the UnitOfWork (TX).
This approach will give you a system that ensures data integrity. Then you can experiment with scaling to multiple servers with or without cache-sync and monitor the load vs failures for your test environment.
I hope this helps,
Doug

Similar Messages

  • Cannot connect with SQL Server driver using Top Link with ADF/JSF

    I have a TopLink/ADF/JSF project that I'm starting using JDeveloper 10.1.3. The database is MS SQL Server. I went through and created all of the Top Link mappings, etc. but when I try to run my project under the OC4J instance built in to JDeveloper I get the error message below. I've tried putting SelectMethod=cursor everywhere I can think of, but nothing seems to help?
    Log Dump:
    [TopLink Info]: 2006.06.16 02:49:46.253--ServerSession(1679)--Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--TopLink, version: Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)
    [TopLink Config]: 2006.06.16 02:49:46.269--ServerSession(1679)--Connection(1680)--Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--connecting(DatabaseLogin(
    platform=>SQLServerPlatform
    user name=> "zeke"
    connector=>JNDIConnector datasource name=>jdbc/ZekeDB
    [TopLink Severe]: 2006.06.16 02:49:48.925--ServerSession(1679)--Thread(Thread[ApplicationServerThread-0,5,RequestThreadGroup])--Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.Error Code: 0
    at oracle.toplink.exceptions.TopLinkException.<init>(TopLinkException.java:46)
    at oracle.toplink.exceptions.DatabaseException.<init>(DatabaseException.java:51)
    at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:276)
    at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:115)
    at oracle.toplink.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:147)
    at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:197)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:221)
    at oracle.toplink.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:273)
    at oracle.toplink.threetier.ConnectionPool.buildConnection(ConnectionPool.java:81)
    at oracle.toplink.threetier.ConnectionPool.startUp(ConnectionPool.java:304)
    at oracle.toplink.threetier.ServerSession.connect(ServerSession.java:431)
    at oracle.toplink.publicinterface.DatabaseSession.login(DatabaseSession.java:511)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:317)
    at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:372)
    at oracle.toplink.util.SessionFactory.getSharedSession(SessionFactory.java:103)
    at oracle.toplink.util.SessionFactory.getSharedSession(SessionFactory.java:82)
    at oracle.toplink.util.SessionFactory.acquireSession(SessionFactory.java:114)
    at com.mascocs.web.monitor.admin.datamodel.ZekeAdminSessionFacadeBean.findAllApps(ZekeAdminSessionFacadeBean.java:128)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:55)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
    at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:86)
    at ZekeAdminSessionFacadeLocal_StatelessSessionBeanWrapper0.findAllApps(ZekeAdminSessionFacadeLocal_StatelessSessionBeanWrapper0.java:165)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:504)
    at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:1796)
    at oracle.adf.model.generic.DCGenericDataControl.invokeMethod(DCGenericDataControl.java:248)
    at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:216)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1287)
    at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:1802)
    at oracle.adf.model.generic.DCGenericDataControl.invokeOperation(DCGenericDataControl.java:266)
    at oracle.adf.model.adapter.AdapterDCService.invokeOperation(AdapterDCService.java:318)
    at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:625)
    at oracle.jbo.uicli.binding.JUMethodIteratorDef$JUMethodIteratorBinding.invokeMethodAction(JUMethodIteratorDef.java:160)
    at oracle.jbo.uicli.binding.JUMethodIteratorDef$JUMethodIteratorBinding.initSourceRSI(JUMethodIteratorDef.java:542)
    at oracle.adf.model.binding.DCIteratorBinding.callInitSourceRSI(DCIteratorBinding.java:1420)
    at oracle.adf.model.binding.DCIteratorBinding.getRowSetIterator(DCIteratorBinding.java:1403)
    at oracle.adf.model.binding.DCIteratorBinding.setRangeSize(DCIteratorBinding.java:2641)
    at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:2484)
    at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2257)
    at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareModel(PageLifecycleImpl.java:104)
    at oracle.adf.controller.v2.lifecycle.Lifecycle$8.execute(Lifecycle.java:210)
    at oracle.adf.controller.v2.lifecycle.Lifecycle.executePhase(Lifecycle.java:116)
    at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.mav$executePhase(ADFPhaseListener.java)
    at oracle.adf.controller.faces.lifecycle.ADFPhaseListener$4.after(ADFPhaseListener.java:331)
    at oracle.adf.controller.faces.lifecycle.ADFPhaseListener.afterPhase(ADFPhaseListener.java:97)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:211)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
    at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
    at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
    at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:332)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:627)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
    at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
    at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbcx.sqlserver.SQLServerDataSource.getXAConnection(Unknown Source)
    at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:237)
    at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:199)
    at com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1333)
    at oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:324)
    at oracle.j2ee.connector.ConnectionPoolImpl.access$800(ConnectionPoolImpl.java:95)
    at oracle.j2ee.connector.ConnectionPoolImpl$FixedWaitPoolingScheme.getManagedConnection(ConnectionPoolImpl.java:1449)
    at oracle.j2ee.connector.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:782)
    at com.evermind.server.connector.ApplicationConnectionManager.getConnectionFromPool(ApplicationConnectionManager.java:1532)
    at com.evermind.server.connector.ApplicationConnectionManager.acquireConnectionContext(ApplicationConnectionManager.java:1477)
    at com.evermind.server.connector.ApplicationConnectionManager.allocateConnection(ApplicationConnectionManager.java:1423)
    at oracle.j2ee.connector.OracleConnectionManager.unprivileged_allocateConnection(OracleConnectionManager.java:244)
    at oracle.j2ee.connector.OracleConnectionManager.allocateConnection(OracleConnectionManager.java:198)
    at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:197)
    at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:140)
    at oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:112)
    ... 77 more
    2006-06-16 14:49:48.941 ERROR J2EE EJB8006 [ZekeAdminSessionFacade:public java.util.List com.mascocs.web.monitor.admin.datamodel.ZekeAdminSessionFacadeBean.findAllApps()] exception occurred during method invocation: javax.ejb.EJBException: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.Error Code: 0; nested exception is: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.Error Code: 0
    2006-06-16 14:49:50.816 WARNING rowIterator is null
    2006-06-16 14:49:50.831 WARNING rowIterator is null
    Process exited.

    I'm not sure on the error, but you may be able to pass the "selectMethod" and "cursor" as a JDBC property in your connection pool. Since this is a DataSource / JTA issue you may want to post it to the general OC4J forum.
    Otherwise as a workaround you could instead use a non-JTA DataSouce, or use TopLink internal connection pooling, or try another JDBC driver.

  • When table with clustered columnstore indexe is partitioned the performance degrades if data is located in multiple partitions

    Hello,
    Below I provide a complete code to re-produce the behavior I am observing.  You could run it in tempdb or any other database, which is not important.  The test query provided at the top of the script is pretty silly, but I have observed the same
    performance degradation with about a dozen of various queries of different complexity, so this is just the simplest one I am using as an example here. Note that I also included approximate run times in the script comments (this is obviously based on what I
    observed on my machine).  Here are the steps with numbers corresponding to the numbers in the script:
    1. Run script from #1 to #7.  This will create the two test tables, populate them with records (40 mln. and 10 mln.) and build regular clustered indexes.
    2. Run test query (at the top of the script).  Here are the execution statistics:
    Table 'Main'. Scan count 5, logical reads 151435, physical reads 0, read-ahead reads 4, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Txns'. Scan count 5, logical reads 74155, physical reads 0, read-ahead reads 7, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Workfile'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
     SQL Server Execution Times:
       CPU time = 5514 ms, 
    elapsed time = 1389 ms.
    3. Run script from #8 to #9. This will replace regular clustered indexes with columnstore clustered indexes.
    4. Run test query (at the top of the script).  Here are the execution statistics:
    Table 'Txns'. Scan count 4, logical reads 44563, physical reads 0, read-ahead reads 37186, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Main'. Scan count 4, logical reads 54850, physical reads 2, read-ahead reads 96862, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Workfile'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
     SQL Server Execution Times:
       CPU time = 828 ms, 
    elapsed time = 392 ms.
    As you can see the query is clearly faster.  Yay for columnstore indexes!.. But let's continue.
    5. Run script from #10 to #12 (note that this might take some time to execute).  This will move about 80% of the data in both tables to a different partition.  You should be able to see the fact that the data has been moved when running Step #
    11.
    6. Run test query (at the top of the script).  Here are the execution statistics:
    Table 'Txns'. Scan count 4, logical reads 44563, physical reads 0, read-ahead reads 37186, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Main'. Scan count 4, logical reads 54817, physical reads 2, read-ahead reads 96862, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Workfile'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
     SQL Server Execution Times:
       CPU time = 8172 ms, 
    elapsed time = 3119 ms.
    And now look, the I/O stats look the same as before, but the performance is the slowest of all our tries!
    I am not going to paste here execution plans or the detailed properties for each of the operators.  They show up as expected -- column store index scan, parallel/partitioned = true, both estimated and actual number of rows is less than during the second
    run (when all of the data resided on the same partition).
    So the question is: why is it slower?
    Thank you for any help!
    Here is the code to re-produce this:
    --==> Test Query - begin --<===
    DBCC DROPCLEANBUFFERS
    DBCC FREEPROCCACHE
    SET STATISTICS IO ON
    SET STATISTICS TIME ON
    SELECT COUNT(1)
    FROM Txns AS z WITH(NOLOCK)
    LEFT JOIN Main AS mmm WITH(NOLOCK) ON mmm.ColBatchID = 70 AND z.TxnID = mmm.TxnID AND mmm.RecordStatus = 1
    WHERE z.RecordStatus = 1
    --==> Test Query - end --<===
    --===========================================================
    --1. Clean-up
    IF OBJECT_ID('Txns') IS NOT NULL DROP TABLE Txns
    IF OBJECT_ID('Main') IS NOT NULL DROP TABLE Main
    IF EXISTS (SELECT 1 FROM sys.partition_schemes WHERE name = 'PS_Scheme') DROP PARTITION SCHEME PS_Scheme
    IF EXISTS (SELECT 1 FROM sys.partition_functions WHERE name = 'PF_Func') DROP PARTITION FUNCTION PF_Func
    --2. Create partition funciton
    CREATE PARTITION FUNCTION PF_Func(tinyint) AS RANGE LEFT FOR VALUES (1, 2, 3)
    --3. Partition scheme
    CREATE PARTITION SCHEME PS_Scheme AS PARTITION PF_Func ALL TO ([PRIMARY])
    --4. Create Main table
    CREATE TABLE dbo.Main(
    SetID int NOT NULL,
    SubSetID int NOT NULL,
    TxnID int NOT NULL,
    ColBatchID int NOT NULL,
    ColMadeId int NOT NULL,
    RecordStatus tinyint NOT NULL DEFAULT ((1))
    ) ON PS_Scheme(RecordStatus)
    --5. Create Txns table
    CREATE TABLE dbo.Txns(
    TxnID int IDENTITY(1,1) NOT NULL,
    GroupID int NULL,
    SiteID int NULL,
    Period datetime NULL,
    Amount money NULL,
    CreateDate datetime NULL,
    Descr varchar(50) NULL,
    RecordStatus tinyint NOT NULL DEFAULT ((1))
    ) ON PS_Scheme(RecordStatus)
    --6. Populate data (credit to Jeff Moden: http://www.sqlservercentral.com/articles/Data+Generation/87901/)
    -- 40 mln. rows - approx. 4 min
    --6.1 Populate Main table
    DECLARE @NumberOfRows INT = 40000000
    INSERT INTO Main (
    SetID,
    SubSetID,
    TxnID,
    ColBatchID,
    ColMadeID,
    RecordStatus)
    SELECT TOP (@NumberOfRows)
    SetID = ABS(CHECKSUM(NEWID())) % 500 + 1, -- ABS(CHECKSUM(NEWID())) % @Range + @StartValue,
    SubSetID = ABS(CHECKSUM(NEWID())) % 3 + 1,
    TxnID = ABS(CHECKSUM(NEWID())) % 1000000 + 1,
    ColBatchId = ABS(CHECKSUM(NEWID())) % 100 + 1,
    ColMadeID = ABS(CHECKSUM(NEWID())) % 500000 + 1,
    RecordStatus = 1
    FROM sys.all_columns ac1
    CROSS JOIN sys.all_columns ac2
    --6.2 Populate Txns table
    -- 10 mln. rows - approx. 1 min
    SET @NumberOfRows = 10000000
    INSERT INTO Txns (
    GroupID,
    SiteID,
    Period,
    Amount,
    CreateDate,
    Descr,
    RecordStatus)
    SELECT TOP (@NumberOfRows)
    GroupID = ABS(CHECKSUM(NEWID())) % 5 + 1, -- ABS(CHECKSUM(NEWID())) % @Range + @StartValue,
    SiteID = ABS(CHECKSUM(NEWID())) % 56 + 1,
    Period = DATEADD(dd,ABS(CHECKSUM(NEWID())) % 365, '05-04-2012'), -- DATEADD(dd,ABS(CHECKSUM(NEWID())) % @Days, @StartDate)
    Amount = CAST(RAND(CHECKSUM(NEWID())) * 250000 + 1 AS MONEY),
    CreateDate = DATEADD(dd,ABS(CHECKSUM(NEWID())) % 365, '05-04-2012'),
    Descr = REPLICATE(CHAR(65 + ABS(CHECKSUM(NEWID())) % 26), ABS(CHECKSUM(NEWID())) % 20),
    RecordStatus = 1
    FROM sys.all_columns ac1
    CROSS JOIN sys.all_columns ac2
    --7. Add PK's
    -- 1 min
    ALTER TABLE Txns ADD CONSTRAINT PK_Txns PRIMARY KEY CLUSTERED (RecordStatus ASC, TxnID ASC) ON PS_Scheme(RecordStatus)
    CREATE CLUSTERED INDEX CDX_Main ON Main(RecordStatus ASC, SetID ASC, SubSetId ASC, TxnID ASC) ON PS_Scheme(RecordStatus)
    --==> Run test Query --<===
    --===========================================================
    -- Replace regular indexes with clustered columnstore indexes
    --===========================================================
    --8. Drop existing indexes
    ALTER TABLE Txns DROP CONSTRAINT PK_Txns
    DROP INDEX Main.CDX_Main
    --9. Create clustered columnstore indexes (on partition scheme!)
    -- 1 min
    CREATE CLUSTERED COLUMNSTORE INDEX PK_Txns ON Txns ON PS_Scheme(RecordStatus)
    CREATE CLUSTERED COLUMNSTORE INDEX CDX_Main ON Main ON PS_Scheme(RecordStatus)
    --==> Run test Query --<===
    --===========================================================
    -- Move about 80% the data into a different partition
    --===========================================================
    --10. Update "RecordStatus", so that data is moved to a different partition
    -- 14 min (32002557 row(s) affected)
    UPDATE Main
    SET RecordStatus = 2
    WHERE TxnID < 800000 -- range of values is from 1 to 1 mln.
    -- 4.5 min (7999999 row(s) affected)
    UPDATE Txns
    SET RecordStatus = 2
    WHERE TxnID < 8000000 -- range of values is from 1 to 10 mln.
    --11. Check data distribution
    SELECT
    OBJECT_NAME(SI.object_id) AS PartitionedTable
    , DS.name AS PartitionScheme
    , SI.name AS IdxName
    , SI.index_id
    , SP.partition_number
    , SP.rows
    FROM sys.indexes AS SI WITH (NOLOCK)
    JOIN sys.data_spaces AS DS WITH (NOLOCK)
    ON DS.data_space_id = SI.data_space_id
    JOIN sys.partitions AS SP WITH (NOLOCK)
    ON SP.object_id = SI.object_id
    AND SP.index_id = SI.index_id
    WHERE DS.type = 'PS'
    AND OBJECT_NAME(SI.object_id) IN ('Main', 'Txns')
    ORDER BY 1, 2, 3, 4, 5;
    PartitionedTable PartitionScheme IdxName index_id partition_number rows
    Main PS_Scheme CDX_Main 1 1 7997443
    Main PS_Scheme CDX_Main 1 2 32002557
    Main PS_Scheme CDX_Main 1 3 0
    Main PS_Scheme CDX_Main 1 4 0
    Txns PS_Scheme PK_Txns 1 1 2000001
    Txns PS_Scheme PK_Txns 1 2 7999999
    Txns PS_Scheme PK_Txns 1 3 0
    Txns PS_Scheme PK_Txns 1 4 0
    --12. Update statistics
    EXEC sys.sp_updatestats
    --==> Run test Query --<===

    Hello Michael,
    I just simulated the situation and got the same results as in your description. However, I did one more test - I rebuilt the two columnstore indexes after the update (and test run). I got the following details:
    Table 'Txns'. Scan count 8, logical reads 12922, physical reads 1, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Main'. Scan count 8, logical reads 57042, physical reads 1, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Workfile'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    SQL Server Execution Times:
    CPU time = 251 ms, elapsed time = 128 ms.
    As an explanation of the behavior - because of the UPDATE statement in CCI is executed as a DELETE and INSERT operation, you had all original row groups of the index with almost all data deleted and almost the same amount of new row groups with new data
    (coming from the update). I suppose scanning the deleted bitmap caused the additional slowness at your end or something related with that "fragmentation". 
    Ivan Donev MCITP SQL Server 2008 DBA, DB Developer, BI Developer

  • Netbeans 6.1  JPA/Top Link essentials - NonDeffered Commit

    Hi,
    I'm trying to make a CRUD application using netbeans 6.1 ide but I am getting errors when deleting a row in a jtable and then reinserting it using the same primary key
    e.g:
    --I delete the table row that has a  code field with 606
    --I create a new row in the jtable with the same code 606
    --I click the save button and it gives me a unique violation as the transaction when committing to the database performs the insertion of the new row before the deletion of the old row.
    If the delete is committed there is no problem. but because the transaction is grouped and sent as one command to the database it doesn't recognise the initial delete.
    There is an option on a UnitOfWork to "setShouldPerformDeletesFirst" but it doesn't help even though I think it should..
    Then there is the CMPPolicy class which has the setDeferModificationsUntilCommit method which I don't tihnk i can use in my Top Link essentials implementation.
    +setDeferModificationsUntilCommit(int deferralLevel)+
    ADVANCED:
    This can be set to control when changes to objects are submitted to the database
    This is only applicable to TopLink's CMP implementation and not available within
    the core.
    Is there a similar way of getting my database changes to be nondefered or perform deletes first, using toplink essentials? >_>
    Thanks,
    Mark
    Edited by: markc2 on Sep 10, 2008 3:40 AM

    Hi!
    Try to use virtual forms. Probably it can help You. You can read about virtual forms here:
    http://developers.sun.com/jscreator/learning/tutorials/2/virtual_form.html
    Thanks,
    Roman.

  • How to I get a link with a "Mail to" address to open up a Compose window in my Yahoo mail, rather than in the Mail progrom on my Mac. I do not use the Mac Mail program.

    How to I get a link with a "Mail to" address to open up a Compose window in my Yahoo mail, rather than in the Mail progrom on my Mac. I do not use the Mac Mail program.
    == This happened ==
    Not sure how often
    == always

    Thank you, "the-edmeister" -- You render a great service, one that lifts my spirits.
    Your answer also taught me to be a little more persistent, as I had started looking at Preferences, and just didn't notice the icons (including Applications) at the top of that window that would have led me to my answer.
    Dave

  • Custom Styled Top Link Bar Sharepoint Foundation 2013

    I want to be able to style the top link bar with some custom CSS but I am unable to find any guides that walk me through the process. I could use a step by step guide. I have sharepoint designer and I know how to open the master page for editing. I've
    tried to link an external CSS page but I still am not quite getting the results I want. I only get part of the CSS to apply. Please help

    Hi,
    Please check the following article about how to style the top navigation with custom css.
    http://msdn.microsoft.com/en-us/library/office/dn205275(v=office.15).aspx
    Here is a good article  for branding top navigation in SP 2013 ,by explaining  the top navigation related style elements :
    http://sharepoint.rackspace.com/branding-top-navigation-in-sharepoint-2013
    Regards,
    If a post answers your question, please click Mark
    As Answer on that post and Vote
    as Helpful
    subhash reddy

  • Using database link  with a dynamic SQL in Forms 5

    I have a Form 5 application where a database link is specified in a client version of dynamic SQL. The function that the application is designed to perform is to access data in a table in a remote database and use it to populate another table in a local database with the same structure as the source table. Dynamic SQL is used because the name of the table can only be resolved during run time.
    The problem is that it gives error with code 'ORA-03113' and text 'End-of-file on communication channel' when you try to run it.
    Is it not possible to use a database link with a dynamic SQL? What can I do to overcome the problem ?

    Try to create a local view based ao the remote table and use the view.

  • Why Using Top Link is best in DB Adapter?

    Hi All,
    Can any one suggest , Why Using Top Link (Build-in Insert, Select etc. operation) is best in DB Adapter over using custom query?
    Thanks

    Hi Vikky,
    for insert/select it depends on what kind of user you are. TopLink lets you browse and click on a tables and have everything generated for you. If you are more a DBA or show me the SQL type then you can just type SQL directly.
    Some advantages of TopLink would be:
    -The range of SQL generated by TopLink is limited, but if you hard code complex SQL into your service you need to maintain it.
    -TopLink can generate at runtime the correct SQL for a given database, making switching from say DB2 to Oracle easy.
    -The merge operation will compare the input XML to the columns on the database and update only what has changed. It can also do a sparse merge. If only 4 columns in the XML were set, only those 4 columns in the database will be updated.
    -For inbound polling the strategy used (LogicalDelete, Sequencing Table, etc) is a configuration property and then at runtime multiple SQL statements are generated. The SQL also takes advantage of advanced syntax like the Oracle-only FOR UPDATE SKIP LOCKED, writing it all yourself may be tedious and error prone.
    -The main benefit of TopLink is when you go beyond thinking about a single table. If you import multiple related tables at once, TopLink will generate the SQL to select from and maintain multiple tables, establish a commit order, and generate a hierarchical XSD. With custom SQL the matching XSD is always flat. I.e. if you just need to insert an emp you could get away with custom SQL. If you need to insert a dept and emps, I would use TopLink.
    -This is also when the intermediary abstraction of an object/table makes more sense, as you only need to import a complex relational schema once, then generate inserts, selects, etc.
    So I hope that helps. They are each equally viable and can do something that the other can't. Where you see an overlap I would go with personal preference.
    Thanks
    Steve

  • How to add a Link with children in the SuiteLink bar?

    Hello,
    I have developed a code to add a new link in the SuiteLink bar using delegate control that works as expected. Now I want to include a new link
    but with children, I have tried many options in my code but with not luck.
    What I need in the SuiteLink bar is something like:
    My Services   Newsfeed  OneDrive  Sites
        Service 1
        Service 2
        Service 3
    Any idea on how to achieve this?
    Thanks,
    Daniel
    Daniel Villacis

    Hi,
    According to your post, my understanding is that you want to add sublink in the top navigation bar.
    There is an article about this issue, it contains the steps about how to create a link with sublink in the top navigation bar, you can have a look at it.
    http://www.helpmeonsharepoint.com/2012/03/custom-sharepoint-top-menu-and.html
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • Href link with //localhost:7001 prefix in index.jsp  for WebLogic Workshop 8.1.2

    I installed the WebLogic Workshop 8.1.2 (Build: 2003.1211.044125). I built all
    six projects
    and everything seems to work well.
    I could access to the sample web services on the WebLogic server from the local
    server
    as well as from a remote client machine by pointing the browser to the following
    two URLs respectively:
    http://localhost:7001/WebServices/index.jsp (browser from local server)
    http://192.168.1.100:7001/WebServices/index.jsp (browser from remote client machine)
    When the "Simple web service sample" page shows up, I could click from the local
    server, and
    go to the HellowWorld.jws link. However, from the remote machine, I got the "Page
    not found"
    error when clicking on the HelloWorld.jws link.
    I checked the index.jsp file in the
    C:\bea\weblogic81\samples\workshop\SamplesApp\WebServices directory on the WebLogic
    server, and found that all the href reference has the //localhost:7001 prefix
    in the link,
    which caused the remote browser to fail.
    I then tried to global replacement and remove all the //localhost:7001 references
    in the
    index.jsp file so that the line changed from something like this:
    href="http://localhost:7001/WebServices/HelloWorld.jws?.EXPLORE=.TEST">HelloWorld.jws</a>
    to something like this:
    href="http:/WebServices/HelloWorld.jws?.EXPLORE=.TEST">HelloWorld.jws</a>
    and then save the index.jsp file in the same directory.
    Now, I fresh both of my browsers and I can correctly access to the HelloWorld.jws,
    and
    all other sample links, from the local server as well as from the remote client
    machine.
    Why is //localhost:7001 needed in the index.jsp file? It seems that without it
    the
    samples work better.

    Hello,
    You will need the full URL when you extend out of your local
    environment. Check out docs here [1] for an overview or for an extended
    story, review the issues [2] involved with clusters, DNS, IP addr, etc.
    Hope this is of some value,
    Bruce
    [1]
    http://edocs.bea.com/wls/docs81/webserv/assemble.html#1076491
    [2]
    http://e-docs.bea.com/wls/docs81/cluster/setup.html#714310
    Shuh Chang wrote:
    >
    I installed the WebLogic Workshop 8.1.2 (Build: 2003.1211.044125). I built all
    six projects
    and everything seems to work well.
    I could access to the sample web services on the WebLogic server from the local
    server
    as well as from a remote client machine by pointing the browser to the following
    two URLs respectively:
    http://localhost:7001/WebServices/index.jsp (browser from local server)
    http://192.168.1.100:7001/WebServices/index.jsp (browser from remote client machine)
    When the "Simple web service sample" page shows up, I could click from the local
    server, and
    go to the HellowWorld.jws link. However, from the remote machine, I got the "Page
    not found"
    error when clicking on the HelloWorld.jws link.
    I checked the index.jsp file in the
    C:\bea\weblogic81\samples\workshop\SamplesApp\WebServices directory on the WebLogic
    server, and found that all the href reference has the //localhost:7001 prefix
    in the link,
    which caused the remote browser to fail.
    I then tried to global replacement and remove all the //localhost:7001 references
    in the
    index.jsp file so that the line changed from something like this:
    href="http://localhost:7001/WebServices/HelloWorld.jws?.EXPLORE=.TEST">HelloWorld.jws</a>
    to something like this:
    href="http:/WebServices/HelloWorld.jws?.EXPLORE=.TEST">HelloWorld.jws</a>
    and then save the index.jsp file in the same directory.
    Now, I fresh both of my browsers and I can correctly access to the HelloWorld.jws,
    and
    all other sample links, from the local server as well as from the remote client
    machine.
    Why is //localhost:7001 needed in the index.jsp file? It seems that without it
    the
    samples work better.

  • How to Create Company and link with Plant

    Dear All
    Kindly help me to create Company and link with Plant and Storage Location through SPRO.
    Kindly trll me TCODE.
    Waiting for Reply
    Thanks & Regards
    Alok

    HI,
    Go to OX02 and create a company code by copying the standard company code 0001 / 1000
    Then go to OX10 and create a plant by copying the standard plant 0001 / 1000
    OX09 - maintain storage loaction for the created plant
    OX08 - create purchase org copying from standrard 0001 / 1000
    Go to OX18 and assign your plant to company code
    OX17 assign purchase org to plant
    In order to get the tcode go to SPRO and in the top menu click on additional informations - additional information - display key - IMG activity.
    After you select this then in the SPRO you have a column additional information comes up. each and every activity in SPRO will have and additional informatiom, in the additional information the last 4 characters is tcode.
    Eg : SIMG_CFMENUSAPCOX02 this is the additional information for CC. the last 4 characters OX02 is the tcode
    Thanks
    Kiran

  • Top Link error 17002 The Network Adapter could not establish the connection

    I have installed an application developped in an another environnement.
    I have created the database schema in my own database.
    I have created a database connection to this schema.
    I have reconciled the schema using this connection (so the database and the connection are available and correct from jdeveloper)
    I have updated the Mapping to use the new connection and new generated the mapping status report without any errors
    and i still have this error ! The Network Adapter could not establish the connection when i access any jsp document containing data from the database.
    I check and recheck everything and all is correct ... sure something is wrong somewhere ... where is the question ...

    Sorry I think you didn't read the thread or you read it too fast !
    I'm not a beginner and I know what the problem is but all the settings are correct in jdev and the database and the listener are running ... i'm able to browse the tables, seeing data reconciling objects with the database connection referenced in the top link descriptor
    It seem that top link is using something else and i don't understand from where it took the connection description.

  • Top Link Special Considerations in moving to Cost Based Optimizer....

    Our current application architecture consists of running a Java based application with Oracle 9i as the database and toplink as the object relational mapping tool. This is a hosted application about 5 years old with stringent SLA requirements and high availability needs. We are currently using Rule Based Optimizer (RBO) mode and do not collect statistics for the schemas. We are planning a move to Cost Based Optimizer (CBO)
    What are the special considerations we need to be aware of from moving RBO to CBO from top link perspective. Is top link code optimized for one mode over the other ?. What special parameter settings are needed ?. Any of your experience in moving Top Link based applications to RBO and best practices will be very much appreciated.
    -Thanks
    Ganesan Maha

    Ganesan,
    Over the 10 years we have been delivering TopLink I do not recall any issues with customizing TopLink for either approach. You do have the ability to customize how the SQL is generated and even replace the generated SQL with custom queries should you need to. This will not require application changes but simply modifications to the TopLink metadata.
    As of 9.0.4 you can also provide hints in the TopLink query and expression framework that will be generated into the SQL to assist the optimizer.
    Doug

  • How can I debug leaks caused by ODBC calls in app linked with libtt.so?

    Hi,
    we are using TimesTen Release 7.0.5.0.0 on Solaris 10.
    and we are using libtt.so to link our application and connect using ODBC calls.
    The problem is that we have made some serious changes to our large code base and now we see a leak.
    Here is what I know:
    1) Although it is easy to reproduce it doesn't seem to follow a clear pattern. ie. the amount leaked isn't a direct function of the number of request or time spent.
    2) When our application is linked with libttclient.so there is no leak at all.
    3) prstat shows increments of 4 MBytes each time it leaks.
    So I suspect it is because the memory isn't freed but how can I tell which ODBC calls are causing it?
    Is there a debug option I could turn on to help with this?
    Perhaps something in ttTraceMon?
    Thanks

    Hello Serge,
    Just a note that we often times get this type of alarm about memory leaks in TimesTen when using the libtt.so library when using tools such as top or prstat to gage memory consumption. The reality is that these commands are not a good way to look for memory leaks / memory utilization when using TimesTen in direct connect mode. The TimesTen database resides in shared memory and so the fact that prstat shows big or increasing numbers should not be alarming.
    The only reliable way to check for memory leaks is to use a tool designed exactly for that such as Purify, which the TimesTen development team uses extensively and so it's unlikely that you'll find memory leaks in TimesTen.
    Have you found that memory is being exhausted after a period of application runtime and transaction iterations?
    You could use ttTraceMon and work with TimesTen support/engineering to extrapolate and answer from the trace it gaves, but unfortunately, there's rarely an easy way to answer queries on what is going on in either the Permament or Temporary partition.
    I'd first make sure that there is indeed a problem but running your application workload for some time. My suspicion is that the prstat command results are being misleading once more.
    Regards,
    Henri

  • Mysterious top link

    I wanted to implement a report template that mimicks the top-link graphic implementation that's found in many of the HTML DB app builder pages. So I got my graphic with a link of <~a href="#top"><~img src="/i/up_arrow.gif"><~/a> into the region template and was testing it out, expecting it to not work because I hadn't defined the top link name for the page template yet. But to my surprise it worked, and continues to work just fine.
    Is this a fluke and do I really need to define the anchor name "top" for the page template? or is there some built-in (either HTML or HTML DB) thing that is making this work? I just want to make sure this thing continues to work.
    Earl

    That is just standard browser behaviour when you
    throw a unknown named page anchor at it.Nice. I like it.
    While we are on the topic, I have never really
    understood why an application needs to implement this
    feature. Doesn't pressing the Home key on the
    keyboard do the same thing? i.e. go to the top of the
    page? So, why re-invent the wheel?Some people are "mousers". When they're mousing they don't want to keyboard if they don't have to. After all - it is a movement of about 6 - 9 inches from that mouse to the keyboard - and we wouldn't want to get too much exercise while we're working at the ole' computer now, would we? ;>)
    Actually, the use-case is such that the user is scrolling a long report page and the top has long since gone out of view. And if they're using the mouse to scroll down to view data they may as well have a quick way to get back from whence they came.
    Earl

Maybe you are looking for

  • Help: can not regist application in HP-UX 11.0

    My application work fine in iAS SP3 for Win2000, but when I deployed it to HP-UX 11.0, It can not regist the application in HP-UX. can any onr help me, thanks Lu yanqiang the error message is: HotSpot VM warning: Setting of property "java.compiler" i

  • F110 payment proposal: Open Items layout

    Hello Gurus, ive got the payment running fine, but when i generate the payment and go into the open items detailed view of propesed payment i can see a lot of fields with diffrent information. There is one filed named Internal order, but he is empty.

  • How can i format my device to get sound on my dv4-2145dx?

    i somehow changed my audio settings to 24 bit 48000 hz on my laptop and now it wont let me play any sounds when i try to test the sounds or change back to default settings a message pops up saying "this format is not compatible for the device" im not

  • Refused subscription

    HI this is elias (cabrowncito) I just noticed that my automatic payment for a 3 month subscription was refused and as a result I've been playing high rates when calling to Mexico,  also when making calls from my phone its been using my plan minutes a

  • Adobe Photoshop CC Video Card Problem

    Hi all, I've had a problem with the new Adobe Photoshop CC and is that I open so just do not do anything or open any document, makes me the video card to its maximum Load as when I play on the PC. This did not happen in previous versions as CS6 or ot