Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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

Reply
 
LinkBack Thread Tools Search this Thread 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 offline
Registered User
 
Join Date: Dec 2001
Posts: 813
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 Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are On
Pingbacks are On
Refbacks are On