home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Product / Product.zip / DBDEMO.ZIP / DEMOFLS.ZIP / DBDEMODB.H < prev    next >
Text File  |  1991-07-03  |  5KB  |  120 lines

  1. /************************************************************************/
  2. /* DATABASE PERFORMANCE CONCEPTS AND TECHNIQUE DEMONSTRATION PROGRAM    */
  3. /* HEADER FILE                                                          */
  4. /* SOURCE - DBDEMODB.H                                                  */
  5. /*  This file contains variable declarations used both by               */
  6. /*  the PM driver program and the imbedded SQL modules                  */
  7. /************************************************************************/
  8. #include <sqlenv.h>
  9. #include <sqlca.h>
  10. struct sqlca sqlca;
  11. extern USHORT far  indices(void);
  12. extern USHORT far  ari(void );
  13. extern USHORT far  rblock(void);
  14. extern USHORT far  stat_dyn(void);
  15. void far StartDB(struct sqlca *);
  16. void far StopDB(struct sqlca *);
  17.  BYTE *stack;
  18.  TID tidSQL;
  19.  BOOL  fSuccess;
  20.  BOOL  WAITING;
  21. short demo_num;
  22. #define DEFAULT_NUM_OF_ITERATIONS  5
  23. #define DEMO_DIED 999
  24. #define DEMO_NOT_AVAIL 998
  25. #define DISPLAY_TIME    297
  26. #define DB_RETURN_OK 0
  27. #define DB_RETURN_BAD 3
  28. #define DB_DEMO_NOT_AVAIL 2
  29. #define STACKSIZE   4096
  30. VOID far SQLthread(HWND);
  31. extern USHORT far  indices(void);
  32. extern USHORT far  ari(void );
  33. extern USHORT far  rblock(void);
  34. extern USHORT far  stat_dyn(void);
  35.  
  36. TIMETEXTStruct Timetext[2];
  37.  
  38. // There are a maimum of two test comparisons
  39. // This could be changed in the future for accomodating more tests
  40. TIMETEXTStruct Timetext[2];
  41. int num_runs; // number of iterations (user entered, default-1)
  42. long error_sql; // sql error code returned from the function
  43. // Headings to display on Demo timings box max 50 chars
  44.  
  45. char temp_timeh_heading1[51];
  46. char temp_timeh_heading2[51];
  47. char temp_timeh_heading3[51];
  48. char *timeh_rblock1 = "Two transactions are run with and without the";
  49. char *timeh_rblock2 = "Record Blocking option.  Average response time";
  50. char *timeh_rblock3 = "for each is displayed at the end.";
  51. char *timeh_ari1 =    "The first transaction uses ARI to find the median" ;
  52. char *timeh_ari2 =    "balance from the ACCOUNTS table. The second does" ;
  53. char *timeh_ari3 =    "the same over RDS and with Record blocking on." ;
  54. char *timeh_statdyn1 = "The same query is run as STATIC SQL and then " ;
  55. char *timeh_statdyn2 = "using DYNAMIC SQL.  Since the query is complex and" ;
  56. char *timeh_statdyn3 = "retreives only one row, STATIC is faster. " ;
  57.  
  58. char *timeh_indices1 = "A query is run against a table with an index and" ;
  59. char *timeh_indices2 = "then against an identical table with no index." ;
  60. char *timeh_indices3 = "Average response time for each is displayed." ;
  61.  
  62. char temp_ebox_heading1[101];
  63. char temp_ebox_heading2[202];
  64. char temp_ebox_heading3[101];
  65.  
  66. // Headings to display on Documnets display box
  67. char *eboxh_rblock1 = "Record Blocking";
  68. char *eboxh_rblock2 = "";
  69. char *eboxh_rblock3 = "" ;
  70.  
  71. char *eboxh_ari1 = "Application Remote Interface (ARI)" ;
  72. char *eboxh_ari2 = "";
  73. char *eboxh_ari3 = "";
  74.  
  75. char *eboxh_statdyn1 = "Static vs. Dynamic SQL" ;
  76. char *eboxh_statdyn2 =  "";
  77. char *eboxh_statdyn3 =  "";
  78.  
  79. char *eboxh_indices1 = "Indices - Short Path to Data";
  80. char *eboxh_indices2 =  "";
  81. char *eboxh_indices3 =  "";
  82.  
  83. char *eboxh_ptech1 = "Database Performance Techniques";
  84. char *eboxh_ptech2 =
  85. "│   Technique              │  Time to     │   Cost    │ Expected   │" ;
  86. char *eboxh_ptech3 =
  87. "│                          │  Implement   │           │ Payoff     │" ;
  88.  
  89. char *eboxh_dbmparms1 =  "Server Parameter Tuning - Database Manager" ;
  90. char *eboxh_dbmparms2 =
  91. " │ Database Manager     │  Default   │   Suggested   │Performance│" ;
  92. char *eboxh_dbmparms3 =
  93. " │    Parameters        │   Value    │     Value     │  Payoff   │"    ;
  94.  
  95.  
  96. char *eboxh_dbparmsl1 = "Server Parameter Tuning - Database Log Parameters" ;
  97. char *eboxh_dbparmsl2 =
  98. " │ Database Parameters  │  Default   │   Suggested   │Performance│" ;
  99. char *eboxh_dbparmsl3 =
  100. " │        Logs          │   Value    │     Value     │   Payoff  │" ;
  101.  
  102. char *eboxh_dbparmsg1 = "Server Parameter Tuning - Database General Parameters" ;
  103. char *eboxh_dbparmsg2 =
  104. " │ Database Parameters  │  Default   │   Suggested   │Performance│" ;
  105. char *eboxh_dbparmsg3 =
  106. " │      General         │   Value    │     Value     │   Payoff  │" ;
  107.  
  108. char *eboxh_dbparmsh1 = "Server Parameter Tuning - Database Heap Parameters" ;
  109. char *eboxh_dbparmsh2 =
  110. " │ Database Parameters  │  Default   │   Suggested   │Performance│" ;
  111. char *eboxh_dbparmsh3 =
  112. " │    Heap Segments     │   Value    │     Value     │   Payoff  │" ;
  113.  
  114. char *eboxh_rdsreq1 = "CONFIGURING AN OS/2 DATABASE REQUESTER USING SQLLOO" ;
  115. char *eboxh_rdsreq2 = "";
  116. char *eboxh_rdsreq3 = "";
  117. char *eboxh_rdssrv1 = "CONFIGURING AN OS/2 DATABASE SERVER USING SQLLOO" ;
  118. char *eboxh_rdssrv2 = "";
  119. char *eboxh_rdssrv3 = "";
  120.