psOTestThreads

Description

     psOTestThreads serves two purposes.
1.  Tests the thread-safety of an ODBC driver.   This program determines
whether an ODBC driver and its associated dependent libraries are thread
safe.   If the driver system is not thread-safe,  this program usually core
dumps.   Other times, this program may log some sort of unusual error.
Just remember:   If the driver is thread-safe, and the ODBC driver supports
the ODBC functions this program calls (which it should), this program runs
2.  Times the speed of the ODBC driver.   This program computes transactions
rates for the test*.sql scripts.  See below.

 

Syntax

psOTestThreads -Sdsn -Vserver -Uusername -Ppassword -Aother_attributes -ppacket_size
-Itest_table.sql -Tnumber_of_threads -Xnumber_of_loops
-Rnumber_of_test_rows -Ynumber_of_rows_per_select
-Flog_file -Ooptions

 

Arguments

-S

ODBC Data Source Name

-V

ODBC Server Name

-U

ODBC User Name

-P

ODBC User Password

-A

ODBC Other Connection Attributes

-p

Network packet size in bytes [defers to ODBC driver]

-I

Test Table Creation SQL Scripts Directory [See below for default.]

-T

Number of connection threads to the ODBC data source [3]

-X

Number of times to execute the algorithm on each thread [3]

-R

Number of rows to insert [100]

-Y

Number of rows to get for each select [10]

-F

Log file

-O

Options

 

Options

m

Use Data Direct ODBC drivers

a

Send application name to data source

t

Use login and results time outs

p

Prepare statements

s

Stored procedures

n

Do NOT drop stored procedures

i

Create indexes

r

Skip reading the rows from the database

u

Update statistics after inserting rows

 

Environment Variables Behind the Scenes

ODBC_DSN

When -S is not specified.

ODBC_SERVER

When -V is not specified.

ODBC_USER

When -U is not specified.

ODBC_PASS

When -P is not specified.

ODBC_ATTR

When -A is not specified.

PS_SYSMSG_FILE

Name of the tool's messages file.

PS_SYSPARAM_FILE

Name of the system parameter file

 

Required SQL Scripts

     This programs depends on previously written SQL scripts which
creates the test tables and stored procedures.   The program looks for the
scripts in the Test Table Creation Script Directory which defaults
to . . .
/disk2/ceccareb/PS/dbaccess/sql/oracle
    This program always use test_table.sql.   If you specify the stored procedures
option, then the program also uses:
test_package.sql
test_insert.sql
test_select.sql
test_update.sql
     This program only runs test_package.sql when the file exists.   The package
script is necessary only for Oracle.
     If you specifiy the -Oi option, this program creates an index on each
test table.   The test_index.sql scripts create the index on the index_area
tablespace.   The only reason to create indexes would be if you want to test
the disk speed of your tablespace configuration.

Number of Rows To Get For Each Select

     The number of selects (per loop) this program runs on a table equals the
number of rows in a table.   You can tell this program to fetch more than 1 row per
select statement by setting the -Y argument.  Why does this program allow you to do
this?   Because different ODBC drivers incur different overheads given a data
stream.   I/O is an expensive operation when comes to elapsed time.  Therefore,
this program allows you to increase the amount of I/O significantly by letting you
bump up the amount of data coming back from the database.   Therefore, not only are
you are testing how fast the database executes a query, but also you are testing
the compactness of the data stream protocol.

Source Code

     Talus Software has given you the source code for this program.  Look in
the dbaccess/demo directory for psOTestThreads.   We provide the source for
these reasons:
1.  Nobody trusts tps times.  So seeing is believing.  By giving you the
    source code, you will see that the program does nothing special between ODBC
    data sources.  You will see that the playing field is level.  By running
    this program, you will produce benchmarks for yourself.  You, like us, will
    find that Oracle is the worst database on the planet.   Even dBase
    performs better than Oracle.   You will also discover that Sybase will
    beat all the competition.  Therefore, I provide the source code so that
    you will discover the truth for yourself.   By the way, by giving you the
    the source code, you can literally change the test SQL queries to do
    whatever you want . . . which also means . . .
2.  You will see how to use the PS API to write your own PS-based applications.
    This program is a great demonstration of the PS API.  It uses the PS API
    to handle threads,  to execute SQL, and to manage ODBC connections using
    the very useful PS's ODBC Multithreaded Connection Pool Resource Manager.

 

Go to DBPowerSuite 7.9 List of Programs.


Updated: Thu Jun 18 21:12:26 2009