home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: Product
/
Product.zip
/
DBDEMO.ZIP
/
DEMOFLS.ZIP
/
DBDEMODB.H
< prev
next >
Wrap
Text File
|
1991-07-03
|
5KB
|
120 lines
/************************************************************************/
/* DATABASE PERFORMANCE CONCEPTS AND TECHNIQUE DEMONSTRATION PROGRAM */
/* HEADER FILE */
/* SOURCE - DBDEMODB.H */
/* This file contains variable declarations used both by */
/* the PM driver program and the imbedded SQL modules */
/************************************************************************/
#include <sqlenv.h>
#include <sqlca.h>
struct sqlca sqlca;
extern USHORT far indices(void);
extern USHORT far ari(void );
extern USHORT far rblock(void);
extern USHORT far stat_dyn(void);
void far StartDB(struct sqlca *);
void far StopDB(struct sqlca *);
BYTE *stack;
TID tidSQL;
BOOL fSuccess;
BOOL WAITING;
short demo_num;
#define DEFAULT_NUM_OF_ITERATIONS 5
#define DEMO_DIED 999
#define DEMO_NOT_AVAIL 998
#define DISPLAY_TIME 297
#define DB_RETURN_OK 0
#define DB_RETURN_BAD 3
#define DB_DEMO_NOT_AVAIL 2
#define STACKSIZE 4096
VOID far SQLthread(HWND);
extern USHORT far indices(void);
extern USHORT far ari(void );
extern USHORT far rblock(void);
extern USHORT far stat_dyn(void);
TIMETEXTStruct Timetext[2];
// There are a maimum of two test comparisons
// This could be changed in the future for accomodating more tests
TIMETEXTStruct Timetext[2];
int num_runs; // number of iterations (user entered, default-1)
long error_sql; // sql error code returned from the function
// Headings to display on Demo timings box max 50 chars
char temp_timeh_heading1[51];
char temp_timeh_heading2[51];
char temp_timeh_heading3[51];
char *timeh_rblock1 = "Two transactions are run with and without the";
char *timeh_rblock2 = "Record Blocking option. Average response time";
char *timeh_rblock3 = "for each is displayed at the end.";
char *timeh_ari1 = "The first transaction uses ARI to find the median" ;
char *timeh_ari2 = "balance from the ACCOUNTS table. The second does" ;
char *timeh_ari3 = "the same over RDS and with Record blocking on." ;
char *timeh_statdyn1 = "The same query is run as STATIC SQL and then " ;
char *timeh_statdyn2 = "using DYNAMIC SQL. Since the query is complex and" ;
char *timeh_statdyn3 = "retreives only one row, STATIC is faster. " ;
char *timeh_indices1 = "A query is run against a table with an index and" ;
char *timeh_indices2 = "then against an identical table with no index." ;
char *timeh_indices3 = "Average response time for each is displayed." ;
char temp_ebox_heading1[101];
char temp_ebox_heading2[202];
char temp_ebox_heading3[101];
// Headings to display on Documnets display box
char *eboxh_rblock1 = "Record Blocking";
char *eboxh_rblock2 = "";
char *eboxh_rblock3 = "" ;
char *eboxh_ari1 = "Application Remote Interface (ARI)" ;
char *eboxh_ari2 = "";
char *eboxh_ari3 = "";
char *eboxh_statdyn1 = "Static vs. Dynamic SQL" ;
char *eboxh_statdyn2 = "";
char *eboxh_statdyn3 = "";
char *eboxh_indices1 = "Indices - Short Path to Data";
char *eboxh_indices2 = "";
char *eboxh_indices3 = "";
char *eboxh_ptech1 = "Database Performance Techniques";
char *eboxh_ptech2 =
"│ Technique │ Time to │ Cost │ Expected │" ;
char *eboxh_ptech3 =
"│ │ Implement │ │ Payoff │" ;
char *eboxh_dbmparms1 = "Server Parameter Tuning - Database Manager" ;
char *eboxh_dbmparms2 =
" │ Database Manager │ Default │ Suggested │Performance│" ;
char *eboxh_dbmparms3 =
" │ Parameters │ Value │ Value │ Payoff │" ;
char *eboxh_dbparmsl1 = "Server Parameter Tuning - Database Log Parameters" ;
char *eboxh_dbparmsl2 =
" │ Database Parameters │ Default │ Suggested │Performance│" ;
char *eboxh_dbparmsl3 =
" │ Logs │ Value │ Value │ Payoff │" ;
char *eboxh_dbparmsg1 = "Server Parameter Tuning - Database General Parameters" ;
char *eboxh_dbparmsg2 =
" │ Database Parameters │ Default │ Suggested │Performance│" ;
char *eboxh_dbparmsg3 =
" │ General │ Value │ Value │ Payoff │" ;
char *eboxh_dbparmsh1 = "Server Parameter Tuning - Database Heap Parameters" ;
char *eboxh_dbparmsh2 =
" │ Database Parameters │ Default │ Suggested │Performance│" ;
char *eboxh_dbparmsh3 =
" │ Heap Segments │ Value │ Value │ Payoff │" ;
char *eboxh_rdsreq1 = "CONFIGURING AN OS/2 DATABASE REQUESTER USING SQLLOO" ;
char *eboxh_rdsreq2 = "";
char *eboxh_rdsreq3 = "";
char *eboxh_rdssrv1 = "CONFIGURING AN OS/2 DATABASE SERVER USING SQLLOO" ;
char *eboxh_rdssrv2 = "";
char *eboxh_rdssrv3 = "";