dbTalk Databases Forums  

Rervasive perfomance .. poor

comp.databases.btrieve comp.databases.btrieve


Discuss Rervasive perfomance .. poor in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alex D. Pichkurov
 
Posts: n/a

Default Rervasive perfomance .. poor - 08-17-2003 , 07:30 AM






For a past 1 year a'm trying to increase our Pervasive database (6.x
datafile and 2000 or V8 engine) perfomance. The work has 3 test objective:
1) With modification we can made to turn to SQL interface from present
Transactional API.
2) How this affect on overal application perfomance
3) With a key features of 2000 and V8 may affect to perfomance and must be
include to the ours system.

Ours system is a like ERP, developed with MS VS 6 on C++. Data store in
Btrieve 6.15 datafile with originality principle - for each month - creates
new datafiles in new folder. This provide linear perfomance for any volume
historic data. The system hase more than 500 type of datafile and all data
store as fixed record length between 500 and 4K bŐtes, and all have 4k page
size. Tested table have up to 100K records. Currently use only Btrive API.

Short resume:
1) Pervasive SQL interface does not provide more perfomance in comparison
with traditional API Find Extended. At the same time, SQL has more risk to
operation - if a table does not have property index - any SQL query can
hang system for a long, long time, without any process information (for
example - if process with FindExtended we can inform user for state of
process)
2) Transfer data to 7.x format provide up to 20% perfomance
3) Include system data does not provide visible feel perfomance, but it only
to one table based Select query
4) Data compression can provide up to 200% perfomance, because data feches
quickly from device
5) Perfomance have linearly dependents to record length.
6) If SQL engine does not keep exactly proper index for query, the execute
time will increse critical to operate system at all.
7) SQL Perfomance to satisfy me only in one case - then whole table cached
in memory !
8) Excecute DDL query unsatisfactorily at all. Simpy add column to table
force SQL engine to create new table and copy all record from source and
down system for many hour.

I suggested to Pervasive:
1) IN FIRST - you can increase speed of retrival records from OS layer. For
example - MS SQL server, for exactly equal tables and hardware, can retrival
up to 2K rows per second, but Pervasive only 200-300 rows per second (3k
length).
2) Change datafile format for normal operate DDL and work without
datadictionary - because not present real ability to compare datafile and
dictionary. You have error in this case, but not answer where error - in
datafile or dictionary ?

Perfomance of SQL Server and Pervasive ? - it CAN'T be compare, with
one except - when all Pervasive data cashed in memory or app operate over
data with limited querys - and for it datafile have optimum indices..
In other case, Pervasive is to much slow than MS SQL w/o any indices..


With regards,
Alex




Reply With Quote
  #2  
Old   
Alex D. Pichkurov
 
Posts: n/a

Default Re: Rervasive perfomance .. poor - 08-20-2003 , 08:42 AM






Thanks Leonard

I'm did research all technical materials from Pervasive and other.
Pervasives "Query Plan Viewer" too simple and don't realy help on OLTP
database.
Sorry, I don't now how to increase IO perfomance, because I'm desision-maker
person, not proffesional programmer, but it's fact about Pervasive IO :-(

It is not Pervasive documented, with you advice to ?:
1) Concept to increase retrival row speed of transactional API, from
200-300 row/sec to ?, independently of hardware. For example convert half
fixed record to variable ?, or split tables ?
2) If we realy have designed the database and access them throw Btrieve API
, how to check row image with estimated data structure, if row length does
not change ?. How to versioning Btrieve databases ?
3) If in requirements said that "User can sort grid by All available
column", that it implement on database schema ? - create indexes for all
column ?, and for each column order ?. In SQL server it may be optimize
later, if needed, but on Pervasive each of such query potentially shutdown
system for the 1, or 10 min on small table (about 100 k recs) while whole
table does not cashed in memory. Plus, real query-s have various WHERE
clause and other
4) If datatable have only fixed record length , can we use safety use the
data compression for perfomance purpose ? (overhead CPU costs
insignificant, because is normal, then server operate with 4% CPU load)

Cheers
--
Alex D. Pichurov

"LHarvey" <lharvey (AT) austin (DOT) rr.com> wrote

Quote:
On Sun, 17 Aug 2003 15:30:24 +0300, "Alex D. Pichkurov"
alex (AT) mpc (DOT) odessa.ua> wrote:

For a past 1 year a'm trying to increase our Pervasive database (6.x
datafile and 2000 or V8 engine) perfomance. The work has 3 test
objective:
1) With modification we can made to turn to SQL interface from present
Transactional API.
2) How this affect on overal application perfomance
3) With a key features of 2000 and V8 may affect to perfomance and must
be
include to the ours system.

Ours system is a like ERP, developed with MS VS 6 on C++. Data store in
Btrieve 6.15 datafile with originality principle - for each month -
creates
new datafiles in new folder. This provide linear perfomance for any
volume
historic data. The system hase more than 500 type of datafile and all
data
store as fixed record length between 500 and 4K bŐtes, and all have 4k
page
size. Tested table have up to 100K records. Currently use only Btrive
API.

Short resume:
1) Pervasive SQL interface does not provide more perfomance in comparison
with traditional API Find Extended. At the same time, SQL has more risk
to
operation - if a table does not have property index - any SQL query can
hang system for a long, long time, without any process information (for
example - if process with FindExtended we can inform user for state of
process)
2) Transfer data to 7.x format provide up to 20% perfomance
3) Include system data does not provide visible feel perfomance, but it
only
to one table based Select query
4) Data compression can provide up to 200% perfomance, because data
feches
quickly from device

If turning on data compression helps the disk IO system is very slow.
There is quite a bit of overhead with compression and variable record
lengths (used internally if compression is on).

5) Perfomance have linearly dependents to record length.

Makes sense, the bigger the record the more data has to be moved.

6) If SQL engine does not keep exactly proper index for query, the
execute
time will increse critical to operate system at all.

Search the Pervasive web site for "Query Plan Viewer" to see how the
SQL engine processes the query. There may not be a usable index
available to the SQL engine as the query is written.

7) SQL Perfomance to satisfy me only in one case - then whole table
cached
in memory !
8) Excecute DDL query unsatisfactorily at all. Simpy add column to table
force SQL engine to create new table and copy all record from source and
down system for many hour.

I suggested to Pervasive:
1) IN FIRST - you can increase speed of retrival records from OS layer.
For
example - MS SQL server, for exactly equal tables and hardware, can
retrival
up to 2K rows per second, but Pervasive only 200-300 rows per second (3k
length).

The Pervasive database engine makes standard DOCUMENTED IO calls to
the OS. It is possible even likely that MS SQL has some advantages
with regards to other IO calls available internally. If you can make
those available to Pervasive I am sure they would be interested in
implementing them.
That being said 200-300 rows / second sounds very slow for the
transactional (Btrieve) API. As the Pervasive SQL engine is
restricted by legacy Btrieve access there is additional overhead e.g.
data type conversions from internal format to ODBC format, with
respect to the SQL performance.

2) Change datafile format for normal operate DDL and work without
datadictionary - because not present real ability to compare datafile and
dictionary. You have error in this case, but not answer where error - in
datafile or dictionary ?

If you have designed the database and access them through both
interfaces then you should know the actual record layout and be able
to check if the SQL schema matches the physical tables.
Barring that there is a "Check Database Wizard" that will tell if some
basic schema problems, e.g. record length mismatch, indexes wrong
type, not lined up. That is all it can check as the files themselves
only hold information about the index columns.

Perfomance of SQL Server and Pervasive ? - it CAN'T be compare, with
one except - when all Pervasive data cashed in memory or app operate over
data with limited querys - and for it datafile have optimum indices..
In other case, Pervasive is to much slow than MS SQL w/o any indices..

If there are not indexes where needed, is that really an engine
problem or a database design issue?

It is quite possible that MS SQL adds indexes internally. Again
Pervasive is constrained by legacy application support (adding an
index would likely break a legacy application).
If the performance can be increased by 100 or even 1000 times by
adding a needed index, add the needed index and enjoy the performance.

Leonard

With regards,
Alex






Reply With Quote
  #3  
Old   
LHarvey
 
Posts: n/a

Default Re: Rervasive perfomance .. poor - 08-21-2003 , 09:02 AM



On Wed, 20 Aug 2003 16:42:43 +0300, "Alex D. Pichkurov"
<alex (AT) mpc (DOT) odessa.ua> wrote:

Quote:
Thanks Leonard

I'm did research all technical materials from Pervasive and other.
Pervasives "Query Plan Viewer" too simple and don't realy help on OLTP
database.
Sorry, I don't now how to increase IO perfomance, because I'm desision-maker
person, not proffesional programmer, but it's fact about Pervasive IO :-(

It is not Pervasive documented, with you advice to ?:
1) Concept to increase retrival row speed of transactional API, from
200-300 row/sec to ?, independently of hardware. For example convert half
fixed record to variable ?, or split tables ?
The size of a file has less to do with Pervasive database performance
than the size of the row. This is especially true if there is a
network hop in the middle.

Quote:
2) If we realy have designed the database and access them throw Btrieve API
, how to check row image with estimated data structure, if row length does
not change ?. How to versioning Btrieve databases ?
3) If in requirements said that "User can sort grid by All available
column", that it implement on database schema ? - create indexes for all
column ?, and for each column order ?. In SQL server it may be optimize
later, if needed, but on Pervasive each of such query potentially shutdown
system for the 1, or 10 min on small table (about 100 k recs) while whole
table does not cashed in memory. Plus, real query-s have various WHERE
clause and other
Grids are dependent on the database schema for implementation.
Some "grid" components are smarter than others about retrieving data.
Some grids suck down all the data from the database needed or not.
This is usually not a good way to write an application larger than an
office pool.
As far as getting any column sorted that is a function of the SQL
engine, it will use a temporary table if needed (no index available).

Quote:
4) If datatable have only fixed record length , can we use safety use the
data compression for perfomance purpose ? (overhead CPU costs
insignificant, because is normal, then server operate with 4% CPU load)
Data compression is safe. The other thought I have on this is, if
data compression is that effective is there actually data in the file?
Real unique data is non-compressible by nature. If the 4000 byte
record has 200 bytes of data and the rest is blanks it may be time to
take a second look at the overall database design. That would
actually be a good candidate for a simple variable length record file.

Leonard
Quote:
Cheers


Reply With Quote
  #4  
Old   
Alex D. Pichkurov
 
Posts: n/a

Default Re: Rervasive perfomance .. poor - 08-25-2003 , 02:53 AM



Thank Leonard, can you tell me how:
1.You write:
Quote:
As far as getting any column sorted that is a function of the SQL
engine, it will use a temporary table if needed (no index available).
Sorry, don't understand, that you provide to me :-(.
We used custom MFC grid (itself develop), with show ony needed portion of
data and planing to develop ATL classes over OleDb, like "Express OLEDB
Library", for implemented Pervasive SQL Engine.

2.
May be it's simple, but I don't understand how to combine in one datafile
record fixed and variable record's portion. In Pervasive SDK I don't find
any help how to create such file, but many info how to use it (except then
ext. data type is BLOB or CLOB).
For example one of ours file DDL (see atachment ddl1.sql, the DDL from SQL
DataTransormation service, because Pervasive Control Center does not provide
it :-(
In general question - how to increase rows retrival speed from this table
?.

With regards,
Alex

--
Alex D. Pichurov
"LHarvey" <lharvey (AT) austin (DOT) rr.com> wrote

Quote:
On Wed, 20 Aug 2003 16:42:43 +0300, "Alex D. Pichkurov"
alex (AT) mpc (DOT) odessa.ua> wrote:

Thanks Leonard

I'm did research all technical materials from Pervasive and other.
Pervasives "Query Plan Viewer" too simple and don't realy help on OLTP
database.
Sorry, I don't now how to increase IO perfomance, because I'm
desision-maker
person, not proffesional programmer, but it's fact about Pervasive IO
:-(

It is not Pervasive documented, with you advice to ?:
1) Concept to increase retrival row speed of transactional API, from
200-300 row/sec to ?, independently of hardware. For example convert half
fixed record to variable ?, or split tables ?

The size of a file has less to do with Pervasive database performance
than the size of the row. This is especially true if there is a
network hop in the middle.

2) If we realy have designed the database and access them throw Btrieve
API
, how to check row image with estimated data structure, if row length
does
not change ?. How to versioning Btrieve databases ?
3) If in requirements said that "User can sort grid by All available
column", that it implement on database schema ? - create indexes for all
column ?, and for each column order ?. In SQL server it may be
optimize
later, if needed, but on Pervasive each of such query potentially
shutdown
system for the 1, or 10 min on small table (about 100 k recs) while whole
table does not cashed in memory. Plus, real query-s have various WHERE
clause and other

Grids are dependent on the database schema for implementation.
Some "grid" components are smarter than others about retrieving data.
Some grids suck down all the data from the database needed or not.
This is usually not a good way to write an application larger than an
office pool.
As far as getting any column sorted that is a function of the SQL
engine, it will use a temporary table if needed (no index available).

4) If datatable have only fixed record length , can we use safety use the
data compression for perfomance purpose ? (overhead CPU costs
insignificant, because is normal, then server operate with 4% CPU
load)

Data compression is safe. The other thought I have on this is, if
data compression is that effective is there actually data in the file?
Real unique data is non-compressible by nature. If the 4000 byte
record has 200 bytes of data and the rest is blanks it may be time to
take a second look at the overall database design. That would
actually be a good candidate for a simple variable length record file.

Leonard

Cheers







Reply With Quote
  #5  
Old   
Alex D. Pichkurov
 
Posts: n/a

Default Re: Rervasive perfomance .. poor - 08-26-2003 , 03:20 AM



Leonard, please tell me - how I can convert my file to a simple variable
length record file ? - all VARCHAR column convert to CLOB type ?
So, what wrong with my datafile ? - Typical OLTP databases have larged
record length then DataWarehouse DB.

Already do convet datatype with Pervasive Table Degisner, and now, for any
query, receive the follow error.
ODBC Error: SQLSTATE = S1000, Native error code = -4896
The chunk offset is too big(Btrieve Error 103)

--
Alex D. Pichurov

"LHarvey" <lharvey (AT) austin (DOT) rr.com> wrote

Quote:
On Wed, 20 Aug 2003 16:42:43 +0300, "Alex D. Pichkurov"
alex (AT) mpc (DOT) odessa.ua> wrote:

Thanks Leonard

I'm did research all technical materials from Pervasive and other.
Pervasives "Query Plan Viewer" too simple and don't realy help on OLTP
database.
Sorry, I don't now how to increase IO perfomance, because I'm
desision-maker
person, not proffesional programmer, but it's fact about Pervasive IO
:-(

It is not Pervasive documented, with you advice to ?:
1) Concept to increase retrival row speed of transactional API, from
200-300 row/sec to ?, independently of hardware. For example convert half
fixed record to variable ?, or split tables ?

The size of a file has less to do with Pervasive database performance
than the size of the row. This is especially true if there is a
network hop in the middle.

2) If we realy have designed the database and access them throw Btrieve
API
, how to check row image with estimated data structure, if row length
does
not change ?. How to versioning Btrieve databases ?
3) If in requirements said that "User can sort grid by All available
column", that it implement on database schema ? - create indexes for all
column ?, and for each column order ?. In SQL server it may be
optimize
later, if needed, but on Pervasive each of such query potentially
shutdown
system for the 1, or 10 min on small table (about 100 k recs) while whole
table does not cashed in memory. Plus, real query-s have various WHERE
clause and other

Grids are dependent on the database schema for implementation.
Some "grid" components are smarter than others about retrieving data.
Some grids suck down all the data from the database needed or not.
This is usually not a good way to write an application larger than an
office pool.
As far as getting any column sorted that is a function of the SQL
engine, it will use a temporary table if needed (no index available).

4) If datatable have only fixed record length , can we use safety use the
data compression for perfomance purpose ? (overhead CPU costs
insignificant, because is normal, then server operate with 4% CPU
load)

Data compression is safe. The other thought I have on this is, if
data compression is that effective is there actually data in the file?
Real unique data is non-compressible by nature. If the 4000 byte
record has 200 bytes of data and the rest is blanks it may be time to
take a second look at the overall database design. That would
actually be a good candidate for a simple variable length record file.

Leonard

Cheers




Reply With Quote
  #6  
Old   
Bill Bach
 
Posts: n/a

Default Re: Rervasive perfomance .. User querys - 08-27-2003 , 09:54 AM




"Alex D. Pichkurov" wrote:

Quote:
Provide by Pervasive query optimizer sort with temp table is unreal,
besause it executing for a 10-30 sec on table with 120K row (1.7 k length
and 4k pagesize) and hardware P4-2.5H, 521 RAM (100 M for Btrieve cache),
IDE 7200.
IDE7200? There's your problem! A high-performance database server should
really be Ultra-Wide SCSI with a RAID1+0 array. Disk performance will ALWAYS be
a limiting factor in temp tables.




Reply With Quote
  #7  
Old   
Alex D. Pichkurov
 
Posts: n/a

Default Re: Rervasive perfomance .. User querys - 08-28-2003 , 12:46 AM



Oh,
You are quite right, this is my workstation, on server we have Ultra-Wide
SCSI Baracuda 5 disks
But the question other - how to
1) designed table for support indicated requirements (4 sort fieds and 5
filtr fields)
2) speed up row retrival from OS ( OR how convert 3k fixedsize record to
simple variable size) and use throw relational and transactional interfaces?

Also, on same hardware (7200), MS SQL too much quick then V8, and the
situation does not change on huge server.

--
Alex D. Pichurov
"Bill Bach" <bbach (AT) cncdsl (DOT) com> wrote

Quote:
"Alex D. Pichkurov" wrote:

Provide by Pervasive query optimizer sort with temp table is unreal,
besause it executing for a 10-30 sec on table with 120K row (1.7 k
length
and 4k pagesize) and hardware P4-2.5H, 521 RAM (100 M for Btrieve
cache),
IDE 7200.

IDE7200? There's your problem! A high-performance database server should
really be Ultra-Wide SCSI with a RAID1+0 array. Disk performance will
ALWAYS be
a limiting factor in temp tables.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.