![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| ||||
| ||||
|
|
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 |
#4
| |||
| |||
|
|
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 :-(. |
|
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 |
#5
| |||
| |||
|
|
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 |
#6
| |||
| |||
|
|
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. |
#7
| |||
| |||
|
|
"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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |