Db_stat performance -  will it depend on database size ?

Does db_stat have to trawl through the database to get its information or is BerkeleyDB clever about maintaining the information ready for db_stat to just query and return ?
We're running db_stat (from a perl program as it happens) and finding that for large databases - 10G or more - it can take over an hour to run so I guess that would suggest it's trawling the database. But for some of our databases it seems to be almost instantaneous. I can't find any docs anywhere
about how it works internally.

FWIW, using the perl wrapper for BerkeleyDB here http://search.cpan.org/dist/BerkeleyDB/BerkeleyDB.pod you can do
my $stats = $self->{db}->db_stat(DB_FAST_STAT);
though it's not 100% clear from the docs. If you still want a count of unique keys (bt_nkeys), create and open the database with the DB_RECNUM option, as below
$self->{db} = new BerkeleyDB::Btree
-Filename => $self->{dbName},
-Env => $self->{env},
-Flags => DB_CREATE | DB_INIT_LOG,
-Property => DB_RECNUM
or croak "Cannot open main database $self->{dbName}: $! $self->{db}::Error\n";

Similar Messages

  • Will moving an Exchange database cause users to have to restart Outlook?

    Hello all,
    I am running Exchange Server 2007. I will be using the "Move Database Path" command through the Management Console to move the database from one partition to another. The users are mostly running Outlook 2007, but some users are running Outlook
    2010.
    My question is, will users have to restart their Outlook clients after the database is moved?
    Thanks.

    Though a defragmented database is appealing, I believe I will just stick with moving the database itself since it is relatively small. From Jim's answer, it sounds like after the database move that Outlook clients will automatically re-connect without having
    to be closed and re-opened.
    Thanks for the help!
    OK, it's up to you, but pay attention - during database moving, all users will be disconnected for a long time, depends on Database size. When you move one or more mailboxes disconnecting occurs only during switching to another mailbox database and for a few
    seconds.

  • Mailbox Database Size/White Space Reduction in a DAG

    I have several large databases in which I'm moving mailboxes off of in an attempt to prevent my LUNs from running out of disk space. As well, I have several mailboxes of users who have left the company. My questions are as follows:
    1. When I run remove-mailbox -id "some mailbox" -permanent $true, the mailbox is deleted from Exchange relatively instantly. Will Exchange recoup the white space that is left behind after the mailbox has been deleted so that the
    database shrinks in size? Or will it just start writing over the white space rather than growing the size of the database?
    2. Perataining to mailboxes that have been moved, if "Keep Deleted Mailboxes for" is set to 4 days on the database that holds mailboxes that I'm moving off, will the database hold onto the mailbox (even though it has successfully been moved to
    another database) for the duration of the "Keep Deleted Mailboxes for" setting? Or will the mailbox be hard deleted after the move completes successfully?
    3. As part of Online Maintenance, will Exchange defrag a databse and decrease the white space, thereby shrinking the database size or will I have to take it offline to do that?
    4. What are the procedures to perform an Offline Defrag of an Exchange Databse? How risky is this?

    Hello,
    To answer your questions:
    1.   When and online database defrag completes a pass on the database it will reclaim this as whitespace in the database. It will not however reclaim space on the disk by shrinking the .edb file. An offline defrag is required for that.
    2.   Moved mailbox will not be hard deleted until the 4 day retention period has past, unless you manually purge them using Remove-StoreMailbox.
    3.   Related to the answer for number 1. Exchange will fill whitespace as mailboxes grow, but it will not reclaim disk space.
    4.   In a DAG you will you need to dismount the mailbox database and run eseutil /d against the active database copy. This is a relatively low risk procedure, but requires databases to be offline thus interrupting mailbox access. It can also
    take quite along time depending on the database size. The rate of defrag estimated by MS is 9 GB/hr. Here is a reference:
    http://support.microsoft.com/kb/192185/en-us
    For these types of situations my preference (If disk space allows) is to move all mailboxes to a fresh database then delete the database with excessive white space

  • How  to increase the database size

    Hi All ,
    Our Client is going to increase their customers from 3.5 million to 5 millions
    (12 millions in future ) and there is no increase in the existing licenses..
    At present we have very less space in Data base server. We are Going Live at the End of the Month.
    How to increase the database size to meet the Client requirements.
    we have to increase the No of Processerors etc...
    Below are the details of Servers:
    System Model: IBM,7040-681
    Machine Serial Number: 830D5BF
    Processor Type: PowerPC_POWER4
    Number Of Processors: 2
    Processor Clock Speed: 1904 MHz
    CPU Type: 64-bit
    Kernel Type: 64-bit
    LPAR Info: 4 bgl-svr-biap
    Memory Size: 4096 MB
    Good Memory Size: 4096 MB
    Note : Server is IBM P690.
    1)  System Lansdcape --> Two System Landsacpe ( Dev to Prod )
    2)  BW Version --> 3.5
    3)  SAP Basis --- > 6.4
    4)  No of Application servers currently having --> Only  One  Server
    Can any body suggest me how to solve this.....
    Thanks in Advance..
    Kasi Chukka

    Hi Kasi,
    Your question is not very clear, from the looks of it, the load on your client's system will be doubling soon.
    You need to look at the system stats on how the system is handling the current load, use transactions ST06, ST04 and ST02 to check if the DB hit ratios are as expected, the cpu idle time, the busy periods. Identify if there is large amounts of paging on the server(candidate for increase in real memory).
    On AIX level, you will need to look at CPU / Memory usage.
    On SAP Application server, you need to look at SAP Buffers.
    On Oracle end, look at SGA stats, if it need to increase, the data growth that is current and estimated growth (DB02).
    You will not get an exact answer to it, you will need to analyze the existing load and then estimate (guess). The hardware upgrade will also depend on what the client is willing to spend, its always a good practise to add 20% to what you have estimated as these figures are never accurate.
    All the best.
    Cheers,
    Nisch

  • Maximum Database size in exchange 2007

    Hi Team,<o:p></o:p>
    What is the maximum database size we can have in Exchange server 2007 SP3 RU8 standalone server.<o:p></o:p>
    In our environment we have 1800 users hosted on the
    exchange 2007 server with DB size(EDB file) of 1.61TB. What is the maximum size it can grow upto. Any response appreciated.
    Thanks<o:p></o:p>
    Srini<o:p></o:p>

    Amit just beat me to posting Harold Wong's article! :-) Since you're currently on 1.61TB the artificial limit has already been adjust via the registry setting mentioned (the article mentioned 50GB though I've seen others mention 250GB). So the maximum limit
    is 16TB, but whoever adjusted things to allow your current size may have set the artificial limit as something smaller, so you'd want to check the registry to see what it has been set to in your case.
    I'd also echo the comments about database size. Depending on how you handle backups then they may also play a part. Since most backups work on the basis of backing up / restoring the entire database (obviously backing up changes rather than the whole thing
    each time), then the event of you needing to restore it's much easier if you have smaller databases to deal with. Splitting your mailboxes across multiple stores will help minimise the time required before you can get some users online again in the case of
    a total failure. Also, if you split your mailboxes across 5 databases and then have a problem (for instance corruption) on one of them, then only around 1/5 of your users are effected rather than all of them.

  • Calculate the database size for a particular company code in SAP

    Hi Experts,
    We have 30 company codes in our FI production system. So to plan another new company code to be deployed into the system, we need to know exact data capacity (database) of the previous company code that we already deployed. Kindly let me know whether it possible to calculate the database size occupied for a particular company code in a SAP system.

    >
    Kalyan Kumar Bandlamudi wrote:
    > Hi Experts,
    >
    > We have 30 company codes in our FI production system. So to plan another new company code to be deployed into the system, we need to know exact data capacity (database) of the previous company code that we already deployed. Kindly let me know whether it possible to calculate the database size occupied for a particular company code in a SAP system.
    Its not possible to calculate data size based on company code.
    By creating company code It will not occupy much space. Depends on your posting documents for particular company codes.
    Thanks
    Siva

  • Calculate database size for a particular company code

    Hi Experts,
    We have 30 company codes in our FI production system. So to plan another new company code to be deployed into the system, we need to know exact capacity (database) of the previous company code that we already deployed. Kindly let me know whether it possible to calculate the database size for a particular company code in a ERP system.

    >
    Kalyan Kumar Bandlamudi wrote:
    > Hi Experts,
    >
    > We have 30 company codes in our FI production system. So to plan another new company code to be deployed into the system, we need to know exact data capacity (database) of the previous company code that we already deployed. Kindly let me know whether it possible to calculate the database size occupied for a particular company code in a SAP system.
    Its not possible to calculate data size based on company code.
    By creating company code It will not occupy much space. Depends on your posting documents for particular company codes.
    Thanks
    Siva

  • Estimation of database size

    Hi,
    How can I estimate the database size required for a Netweaver system?
    I am installing a new system with ESS and MSS.
    And what is the rate that this database will normally grow?
    Appreciate any reply.
    Thanks,
    Tzyy Ming

    Hi Tzyy,
    you should expect around 20 GB for a newly installed system. The growth rate very much depends on the scenarios you intend to use (MSS/ESS) and the number of users. Since it is almost impossible to predict the growth rate we always make sure that we provide enough space for at least 12 month under "worst case scenario" conditions - that works for us.
    You might want to check the SAP Quicksizer (hardware estimate). It gives you an idea of what are relevant factors for your scenario: http://service.sap.com/quicksizing
    Sven

  • Use OEM to monitor oracle database size

    Hello All,
    We currently have several database which are currently monitored via OEM however i will appreciate if anyone can tell me how i can monitor the the size of my oracle databases via oem
    Thanks

    Hi,
    I'm not sure of OEM will monitor database size, but many 3rd party tools do.
    There are many ways to achieve Oracle table monitoring, and many create specialized extension metadata tables to monitor Oracle table growth. In Oracle 10g you can perform Oracle tables monitoring with the dba_hist_seg_stat tables, specifically the space_used_total column.
    On my databases, I create STATSPACK extension tables to track table and overall database growth:
    http://www.dba-oracle.com/te_table_monitoring.htm
    The full scripts are in my Oracle Press book, Oracle tuning with STATSPACK . . .
    http://www.amazon.com/Oracle9i-High-Performance-Tuning-STATSPACK-Burleson/dp/007222360X
    Hope this helps . . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference"
    http://www.rampant-books.com/book_2005_1_awr_proactive_tuning.htm

  • Database size and backups

    I have deleted a large number of records from a database which accounted for much of the space being used as it was not needed at this time. When I take a backup of the database will the size of the db I then restore from this backup be reduced or should
    I shrink the database first. Didn't want to have to perform a shrink operation if not necessary as I've seen posts that it affects performance.
    Thanks
    Robert

    If you have deleted chunks of data and take the backup the size of the backup will be reduced. However if you want to release the unused space from the running database(with out backup and restore), you could do a shrink
    Have a look at this link
    http://dba.stackexchange.com/questions/28360/sql-server-database-size-didnt-decrease-after-deleting-large-number-of-rows
    from
    the above link
    I've blogged about this where I admonished folks to "Don't
    touch that shrink button!" but sometimes... Sometimes you need to. 
    Satheesh
    My Blog |
    How to ask questions in technical forum

  • Database size estiamtion

    how to estimate the database size ,can anyone help, what are the parameters I need to consider.

    I doubt that this is a worthwhile exercise... space is relatively cheap. And whether a database is 50GB or 500GB will be a very small cost factor given the cost of the server, the cost of o/s and Oracle licensing, the cost of development, the cost of maintenance and so on.
    Take for example the size of the data dictionary that you want to estimate. That's not only dependent on the number of tables and columns. It also depends on how much PL/SQL code there is. The number of views. Whether the tables and columns are defined with comments or not. Etc.
    Redo size? Nothing to do with the number of tables, the size of the tables, or number and sizes of the columns - everything to do with the amount of transactions there will be.
    Tablespace size for the tables? What about block size, the amount of free space in a block (pctused and pctfree), how often rows are deleted, whether new rows are primarily added via direct path inserts (using new data blocks) or normal inserts (re-using existing data blocks with sufficient free space).
    It seems to me that you think that you can accurately estimate the sizes of all areas of the database and tie a pretty pink ribbon around it, and will be nice and clean and correct and accurate.
    In my experience... Real world database ain't like that. And trying to do an accurate size estimate is a waste of time and resources, with the end result not wort the 2c's of the piece of white paper it is printed on...

  • Estimating the Database Size using Archivelog mode

    Dear OTN Forum,
    I need to find guidelines to estimate the additional space needed for a database in order to operate in archivelog mode.
    I've estimated the size of a database (Tables + indexes= 450 GB + 270 GB) operating in nonarchivelog mode, but I didn't know how to estimate the additional space needed to operate the database in archivelog mode.
    Please any kind of information will be well received!
    (paper, technical bulletins, metalink, etc.)
    Best regards,
    Alfredo

    The space required for archive logs does not depend on the size of your database. It is dependent on 3 factors.
    1. The size of your redo log members. Each archive log will be the same size as a redo log file.
    2. The number of transactions you do in the database. Each transaction writes information to the redo logs, and each redo log is archived when it is full.
    3. How laong a period you want to keep the archive logs available on disk for.
    For example, one of our systems is a very active OLTP system with about 500 users at peak times and around 100 fairly constantly. The database is about 40Gb, but it spins 15 - 20 64Mb archive logs each day. Typically, we keep 2 days worth of logs on-line at any given time. so, this system requires between 1.8 and 2.5 GB for archive logs.
    Another system, used mostly for reporting purposes, is over 100GB, but typically generates 5 - 6 32MB archive logs each week. So, it requires less than 200Mb for archive logs.
    HTH
    John

  • Data_Transfer and Database size.

    Hello all,
    I am using a Data_Transfer transform to speed up job performance. My question is that if I use these transforms will database size increase by a larger percentage than if not using it. And if so are there options that I can select to limit the size in growth in Data Services and in the Database? The database that is being used is Oracle 11g.
    Thank you

    Hi Shiva,
    Thank you for your response. Just to make sure I understand you mean that after the job is done, whatever temp tables are creating during the "Data_Transfer" are removed from the database and will not take up space? Also does using this method increase the database log size much more than just using a DS job without it?
    Thank you and sorry for all the questions.

  • Mismatch between the Content Database size and the total of each site collection' storage used.

    Hi All,
    Environment:  SharePoint 2010 with SP2.
    Issue: One of the Content databases size in our farm shows 200 GB as used. There are 25 site collections in the DB and we counted
    the total storage used of all site collections in that Content DB and is not more than 40 GB. (used "enumsites" command and counted the each sitecollections storage used).
    What actions/troubleshooting were done?
    Ran one script which will find the actual size of site collection and how much space used in the disk. But didn’t find major difference in the report.
    Checked “Deleted from end user recycle bin “in all the site collections and no major storage is noticed.
    Planning to Detach the problematic Content DB and attach ,will check whether any major effect is there
    Why the Content DB shows 200 GB as used when the total storage used of all site collections is just 40 GB.
    Appreciate suggestions from any one.
    Best Regards,
    Pavan Kumar Sapara.
    s p kumar

    Hi,
    Thanks for your reply.
    As there is only 20 MB of unallocated space for the above said DB, SQL DB team informed that they cannot perform the DB shrink at this moment.
    So we are thinking to Offload all the site collections to other new DB and then will Drop the problematic database. In this way we can overcome the
    issue.
    Answer for your queries.
    Are the mismatched sizes causing an issue? Are you short on diskspace for DB storage or SQL backups?
    No, there is no issue with the mismatched sizes. We are not on short on disk space. We just worried why it occupies that much size(200 GB) when
    the total storage used of all site collections in that DB is 40 GB.
    Best Regards,
    Pavan Kumar Sapara.
    s p kumar

  • BW System copy from PRD to DEV - Reduce database size

    Hi All
    We are in the process of copying our existing Production BW system (3.5) to become a new Development & test system. We want to reduce the database size significantly from 1.4 Tb to about 150 - 200 Gb. We have deleted all cube and ODS data as well as much of the master data but still have much tablespace tied up in monitor entries (eg table RSMONMESS) and IDOCs. All of the notes I read say that we cannot delete from RSMONMESS in a "Prodcution" environment, however we are creating a new DEV system and really need to get rid of monitor entries anyway. So there are two questions:
    1. Any idea how we can clear up table RSMONMESS or delete unwanted monitor entries ?
    2. How can we delete IDOCs copied from our production system without archiving them ? (They are of no use in our new test system.)
    Please help.
    Many thanks in anticipation.
    Paul Sullivan
    Orica IT

    Hi Paul,
    See SAP Note 694895 - Performance and tables RSMON, RSDONE
    Note Language: English Version: 5 Validity: Valid Since 29.11.2005
    Summary
    Symptom
    Tables RSMON* (for example, table RSMONMESS) and tables RS*DONE (for
    example, table RSSELDONE) continuously increase in size in the BW system
    with each request that is created.
    Currently there is no option to reduce these tables.
    Do not delete any entries from these tables. If you did, this would have
    the following consequences:
    When you carry out the next check for the requests for which you have
    deleted records from these tables, the check will not run properly.
    The status of the relevant requests turns RED in the monitor, and also in
    all affected data targets that contain the request.
    The affected request and all subsequent requests are no longer visible in
    the reporting - all queries on the affected data targets then only display
    old data.
    Numerous dumps will occur in various situations.
    You will not be able to repair the errors caused by the deletion.
    More Terms
    RSMONMESS; RSSELDONE; Performance; RSMON; RSDONE;
    Cause and Prerequisites
    This is caused by a program error.
    Solution
    In the next BW release (BI in SAP NetWeaver 2004s - that is BW 7.0), you
    will be able to archive entries from the RSMON* and RS*DONE tables using a
    request archiving process that archives the administrative information for
    requests.
    After archiving, these tables are then considerably reduced in size.
    Until then, there is unfortunately no option for reducing the tables.
    Rgds,
    Colum

Maybe you are looking for

  • CS6 Bridge Will Not Launch

    My problem is that Bridge won't open or give any errors. It just gets hung up in the background and never opens. Seems to have started happening when I upgraded to the latest 10.10.2. CS6 Mac OS 10.10.2 Mac mini (Late 2012) I've uninstalled and reins

  • Copa flow of actual values

    Hi all, In our COPA, we have some value field that are linked to SD documents and assessments from cost center.  The issue is that the SD documents and the assessed documents have different prefixes. Is it possible to match the prefix, so that the sa

  • Exchange Server 2010 on Windows Server 2012 Standard

    Hello, I'm trying to install Exchange 2010 on Server 2012 STD.  The process halts after one of the pre-requisites does not get installed.  Following is the error message: Configuring Prerequisites Failed Error: The following error was generated when

  • I want to delete photos on my ipad but not delete them from my main computer?

    After deleting my photos from my iPad to make room for more, does this automatically delete them from my main computer or is there a mechanism to prevent them from being deleted from the main computer?

  • Macbook Pro Running Slow (2yrs old)

    My macbook pro has been running slow for several months. I thought maybe it was because my 12yr old created a second user account, but I think I deleted it and I'm still having issues. I downloaded a report from Etrequick and here is what it said: Pr