Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best method to get data from tables time/resources.
Message
From
01/05/2001 10:42:41
 
 
To
30/04/2001 09:58:20
General information
Forum:
Oracle
Category:
Troubleshooting
Miscellaneous
Thread ID:
00501487
Message ID:
00501957
Views:
22
My adivse would be it depends.

- adding columns "number of topics" and "number of replys" to table "forums" to store the number of messages. (creating a trigger to update that info each time a new message is posted).

This has the disadvantage that update will be slower with the trigger.
You will also have to code more.
Might be pretty good if a lot of users access the forums but do not post messages. I.E. the number of selects is greater than the number of updates.

- Catch all the info (Only one SELECT with nested SELECT count(*) each time the forum list is shown) --> Not sure about process time and required cpu resources

I don't like nested selects. It may be slow if the tables get large
for users to access the forums. But I suppose it depends on how much update vs viewing is going to happen and where you don't mind the slight lag.
Indexes will help.

- Create a new view with count(*) information in columns "number of topics" and "number of replys" --> Not sure if there is *real* difference between this choice or the previous one.

Essentially no the view is not a different option however I pref views
to selects in SQL as the access path times are reduced i.e. faster selects.
And the logic is placed on the server and can be changed and optimized in the view rather than changing the application.

My guess is the first solution is best.

Just curious are you able to use CLOB's without problems in VFP.
If so what method are you using?

HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform