Subject | Re: [IBO] Drop Table...Advice please |
---|---|
Author | Helen Borrie |
Post date | 2001-08-09T15:00:23Z |
At 03:46 PM 09-08-01 +0100, you wrote:
Neither of those options is a good idea. What happens if User A wants to drop or empty the table when User B is using it?
The best plan is to simply add rows to your table and mark them somehow to identify them to a particular user/session. You can probably log the primary keys of rows to another table when the rows are no longer required, using a trigger, and have some kind of a service that does housekeeping on this temporary storage periodically.
regards,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Hi everyone.Dave,
>I want some temporary tables, which need to start empty,
>but are used quite frequently.
> From the point-of-view of Interbase and filling up the database is it better to:
>A. empty the table (sql = 'delete from temptable') or
>B drop the table and then re-create it .
> sql = 'drop table temptable'
> sql = 'create table temptable( .......'
>
>Your Expert advice Please !!
Neither of those options is a good idea. What happens if User A wants to drop or empty the table when User B is using it?
The best plan is to simply add rows to your table and mark them somehow to identify them to a particular user/session. You can probably log the primary keys of rows to another table when the rows are no longer required, using a trigger, and have some kind of a service that does housekeeping on this temporary storage periodically.
regards,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________