1 Reply Latest reply: Feb 19, 2014 6:28 PM by Greybird-Oracle RSS

    What is performance cost of DatabaseConfig.setSortedDuplicates true

    user4173612

      We were looking our Berkeley environment and I noticed that we have DatabaseConfig.setSortedDuplicates( true ) on all of the databases in the environment even the ones that should never have duplicates.  Does anybody know what the read performance hit will be, if any, for a database that doesn't have duplicates?

       

      Thanks,

       

      Chris Stillwell

        • 1. Re: What is performance cost of DatabaseConfig.setSortedDuplicates true
          Greybird-Oracle

          It's surprising that you're getting the behaviour you want, when configuring duplicates accidentally.  For example, put() will overwrite the value with the given key without configuring dups, but will not overwrite (will insert a duplicate) when dups are configured.

           

          Note that you cannot have a secondary DB for a primary DB, if that primary DB has dups configured.

           

          The performance question is hard to answer.  It depends on the size of the keys and the data, and to be honest we've never made a series of measurements to compare the two.

           

          --mark