[jboss-user] [JBoss Cache] - Index on JDBCCacheLoader

Maurizio Mauri do-not-reply at jboss.com
Mon Feb 14 09:19:59 EST 2011


Maurizio Mauri [http://community.jboss.org/people/maurizio.mercatis] created the discussion

"Index on JDBCCacheLoader"

To view the discussion, visit: http://community.jboss.org/message/587257#587257

--------------------------------------------------------------
Hi everybody!!


I have developed a cache component to support a web application with JBossCache and it works fine.


I have chosen a JDBCCacheLoader to deal with persistence activities. Now for a particular reason I have to schedule a task (during the night) that perform some activities on my contents tree.


To visit all my nodes I have set up a recursive function that perform this instruction "node.getChildren()" but it seems quite slow with lots of entries. I have placed an index on "FQN_parent" column to improve the performance and I have observed a great improvement (about 100 time).


Considering that JDBC retrieve metadata about index could it be a good idea to support this kind of activities?

<loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
          <properties>
                    cache.jdbc.table.name=jbosscache
                    cache.jdbc.table.create=true
                    cache.jdbc.table.drop=true
                    cache.jdbc.table.primarykey=jbosscache_pk
   <!-- cache.jdbc.table.index=ix_jbosscache -->
                    cache.jdbc.fqn.column=fqn
                    cache.jdbc.fqn.type=VARCHAR(255)
                    cache.jdbc.node.column=node
                    cache.jdbc.node.type=BLOB
                    cache.jdbc.parent.column=parent
                    cache.jdbc.driver=oracle.jdbc.OracleDriver
                    cache.jdbc.url=jdbc:oracle:thin:@localhost:1521:JBOSSDB
                    cache.jdbc.user=SCOTT
                    cache.jdbc.password=TIGER
          </properties>
</loader>
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/587257#587257]

Start a new discussion in JBoss Cache at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2052]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110214/b70745dd/attachment.html 


More information about the jboss-user mailing list