home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / database / informix / 2801 < prev    next >
Encoding:
Text File  |  1992-12-23  |  3.4 KB  |  81 lines

  1. Path: sparky!uunet!gatech!darwin.sura.net!spool.mu.edu!olivea!gossip.pyramid.com!pyramid!infmx!davek
  2. From: davek@informix.com (David Kosenko)
  3. Newsgroups: comp.databases.informix
  4. Subject: Re: [David Kosenko:  Re: turbo extents used]
  5. Message-ID: <1992Dec21.172405.8342@informix.com>
  6. Date: 21 Dec 92 17:24:05 GMT
  7. References: <1gndqsINN29i@emory.mathcs.emory.edu>
  8. Sender: news@informix.com (Usenet News)
  9. Organization: Informix Software, Inc.
  10. Lines: 69
  11.  
  12. Anbarnes@letterkenn-emh1.army.mil writes:
  13. >Dave K writes in response to my request for help on determining how many
  14. >extents are in use in Turbo 2.10.03G:
  15. >>If the table is active (and you can make it active by going into isql and
  16. >>issuing a LOCK TABLE statement), then tbstat -t will show the number of
  17. >>extents allocated for the table (nextns).  There is a trick, however, in that
  18. >>tbstat shows the table with its tblspace number (partition number in Turbo
  19. >>parlance) not the table name.  To get a list of table names and their
  20. >>respective (hex) partition/tblspace numbers, use the following query:
  21. >>
  22. >>        select tabname, hex(partnum) from systables;
  23. >>>
  24. >>Dave
  25. >Good idea, and I had been told that before, but on our system that gives
  26. >a syntax error.  It doesnt like the hex word.  We are running ISQL
  27. >2.10.03G on a Unisys 5000.  Is that a "bug?".  Yes, we are on our way to
  28.  
  29. I *hate* when that happens!  I can only assume that the hex() function was not
  30. yet added in that version (I can't even check, as the version is so old).
  31. The next best thing is to get the numbers out in decimal and convert them
  32. to hex.  I use the following little C program to do such conversions:
  33.  
  34. #include <stdio.h>
  35. main(argc, argv)
  36. int argc;
  37. char *argv[];
  38. {
  39.     long x;
  40.     if (argc<2) return(-1);
  41.     x = atoi(argv[1]);
  42.     printf("%x\n", x);
  43. }
  44.  
  45.  
  46. Use the following SQL:
  47.  
  48.        select tabname, partnum from systables;
  49.  
  50. >On-Line, but not until our application programmers get the application
  51. >ready to go.  The Unisys platform has only progressed to 4.1 that I am
  52. >aware of, there is no 5.0 or 6.0 like all you Sun etc. types are longing
  53. >for or even using.  Yes, it is an "antique" platform, but we do the best
  54. >we can with your tax dollars, and right now that doesnt include new
  55. >hardware.  Is there any further assistance on the problem of hex(partnum)
  56. >or how to tell what extents are being used?  Thank you for your responses.
  57.  
  58. Well, looking at my "witholdings", you should have enough tax $$ to buy
  59. some new equipment in 93 ;-).  If the above suggestion doesn't do it for
  60. you, you could do the following iterative operations:
  61.  
  62. 1. Do a tbstat -t.  Note the partnums of all the tblspaces.
  63. 2. STart up isql and select your database.  tbstat -t again and note any
  64.    new partnums (I don't think there will be any, but just to be safe).
  65. 3. LOCK TABLE tabname IN EXCLUSIVE MODE.  tbstat -t and look for the new
  66.    active tblspace.  It will be the table you just locked.  Check the
  67.    nextns file for the number of extents.
  68.  
  69. >PS:  Dave K, I cannot seem to succesfully e-mail to you. My phone is
  70. >717-267-9869. Please call re: ISAM info you wrote about. Thanks.
  71.  
  72. I have received at least 2 emails from you, to which I have responded.
  73. Look to the U.S.Mail for an envelope from me.
  74.  
  75. Dave
  76. -- 
  77. Disclaimer: These opinions are not those of Informix Software, Inc.
  78. **************************************************************************
  79. "I look back with some satisfaction on what an idiot I was when I was 25,
  80.  but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney
  81.