Global performace

Frank
2012-06-11
2012-12-29
  • Frank

    Frank - 2012-06-11

    I am designing a database using GT.M.  I have two options for database data structure.  One is to use use one global to store data in all database and use different first subscript for different database.  The other is to use different global to store data for different database.  Can someone tell me which one use more spaces and which one is  has better performance?  Also are there some document discussing performance for different design and programming in GTM?

    Thanks in advance.

     
  • K.S. Bhaskar

    K.S. Bhaskar - 2012-06-11

    If you have a choice, use different globals. There is not a document that discusses the trade-offs, but in general, more globals should give you better performance as long as you are not forced to use indirection or Xecute with multiple globals.  If that is the case, a single global will be better.

    Regards
    - Bhaskar

     
  • tmr

    tmr - 2012-06-11

    Hi,

    With separate globals, you can get at least possibility to split entire database into several database files. This is good because you can get following benefits just by changing global name mapping in your Global Directory:

    • there's a database file size limit (well, quite high), so for really big globals, moving a single global into it's own file increases your size limitations;
    • each record has to fit database blocksize, so you can do (performance, block/record/key size) tuning on globals where you need individual care about such parameters.
      For example, if you're going to store huge volumes of binary data (medical imaging data, typically), you can use ^BinaryStore and map it into BinaryStore.dat with 16k or 32k blocksize, and key/record size set according to this blocksize. In your code, you have to ensure you will never set more data than your key/record size settings allow.
      For other globals, you can use another .dat file with 4k blocksize with another parameters.
      If you plan to have some kind of application cache, you can configure other database file with memory-mapped globals, temporary stuff, etc.

    So from my experience, I can confirm what Bhaskar said in his previous post: if you choose to go with separate globals, you can do all of this tuning relatively independently on your application code itself.

    Tom

     
  • Frank

    Frank - 2012-06-11

    That is helpful.  I think I will take the suggestion to use separate global for different database.  Thanks a lot.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks