If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Pervasive.SQL > Stored Procedures

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-09-08, 20:13
iroskelley iroskelley is offline
Registered User
 
Join Date: Apr 2008
Posts: 8
Stored Procedures

Hello again - I have a question about building stored procedures in Pervasive. I use Pervasive with an accounting application and need to build a new Crystal Report. I have bulit the report using an ODBC connection to Pervasive and unfortunately have run into some serious performance issues. I am confident that the performance issue is not in the query since I am running the same query in MS Access (linked tables) and it is processing in a matter of seconds.

I believe the root of the problem is in the data relationships. In Crystal, I am running 2 different queries, and then using a left outer join on a table.

Is it possible to build a materialized view in Pervasive? This will prevent the SQL from running everytime we run the report. I could schedule this to refresh every hour and then the report can be available on demand.


Thanks again!
Cheers,
ian
Reply With Quote
  #2 (permalink)  
Old 06-09-08, 22:02
mirtheil mirtheil is online now
Registered User
 
Join Date: Dec 2001
Posts: 1,015
Short answer, no. There is no "materialized view" in Pervasive. There isn't way to prevent the SQL from being executed everytime.

One comment though, if the query is fast using linked tables (to the same PSQL database) in Access and is slow in Crystal then the problem is not in the PSQL engine. PSQL does not distinguish between different applications. Crystal may be the culprit here.

You might be able to create a Stored Procedure to execute the 2 queries and the left outer join. You'll need to use the RETURNS clause in the Stored Procedure to get records back. A View might be a better option but I'm not sure what your SQL is. A View is only really good for a single SQL statement.
__________________
Mirtheil Software
Certified Pervasive Developer
Certified Pervasive Technician
Custom Btrieve/VB development
http://www.mirtheil.com
I do not answer questions by email. Please post on the forum.
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On