the data will be normallized but for each session it could be 1000 rows
thanks
Main Topics
Browse All TopicsHello,
I am looking for some insigt.
I have a web application that via a query is going to populate a table.
when finished the data will be thrown away.
first i was thinking of temp tables, but from what i can tell the table will be dropped as soon as the dbsession is dropped which will not for for me since i am using database pooling so the sessions really never drop and each time the user goes to a new page thier session is the same but they will get a different DB session.
So what i am wondering is it better to create a table and when the users session dies , the appication deletes the table, or is it better to have a table where i just insert and delete rows
thanks for any insight
Randy
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Taking the database's session management into the application is bound to cause you headaches. Instead, use the idea you stated in your question:
>>> or is it better to have a table where i just insert and delete rows
One part of each row should be the user it belongs to. That means one big 'temp' table that all users have access to through a view which limits them to only their records.
regarding routinet's suggestion, i don't think that's the best idea because of the frequency of insert/deletes. the index regeneration will be slower than managing each user as a table separately if there are 1000 rows/user.
the point about not bringing session management into the app is definitely valid and should be taken into account as a liability of the method i recommend.
one more thing to mention.
once this data is compiled for this users session , i will be doing various filters on this dataset
so the user will build this initial dataset
the hopefully play with it a little (during their session) but multiple webpage pages which would mean different mysql session.
I guess what may be the best is to do some timing tests
i appreciate your comments
Business Accounts
Answer for Membership
by: virmaiorPosted on 2009-10-09 at 07:24:43ID: 25535277
for what you describe, it seems it would be better to use a rows within a table solution
the overhead of adding a table and dropping it is more than adding a single row and dropping it or updating at at time.
another variable here is how much data is going to be in each row and whether it is properly normalized.