Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crating Stored Procedure in PCC

Status
Not open for further replies.

boriska40

Programmer
Sep 4, 2003
31
0
0
CA
Hi,

I have table with a lot of columns (>100). Lets say
first field FLD1 Char(12) is a primary key.
I need to create procedure, that returns me all columns,
using 2 parameters: par1 and par2 (WHERE FLD1 BETWEEN
:par1 and :par2).

Thanks

 
WHy do you need a Stored Procedure? There is no performance gain by using a Stored Procedure with Pervasive.SQL. You can issue just a Select statement. It would be something like:
select * from table where fld1 between PAR1 and PAR2
The fieldlist could also be set within the statement. If you're doing this in code, the values of PAR1 and PAR2 can be set to anything that matches the data type of fld1.

info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
mirtheil, thanks for your response.
One of our clients is using Macola 7.6 and Access XP.
He is using old Pervasive 32-bit driver.
Some of the tables are huge (more than 100000 records).
Access queries (based on linked tables) run >=45 min. I'd like to test it using stored procedures and Pervasive ODBC Engine/Client interface.
 
Again, using a Stored Procedure will not gain any performance. A Stored Procedure is really more of a stored statement. There is no pre-compilation of a Stored Procedure. You would do better to optimize the SQL statement. I only say this to save you time and effort.
Are the Access queries Pass Through? If not, that might help with performance. Also, what are the queries? Post them and maybe we can help.


info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
Boriska40,

I would write a crystal report for this. If you use the proper indexes and the record selection formula for the report passes thru to the SQL statement in crystal, the performance should be much better than this.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top