Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Memory Database vs Temp Tables
Tue, Nov 27 2007 11:04 AMPermanent Link

Gordon Turner
In DBISAM I used memory tables for temporary data (that lived for the
life of the application session).  In EDB I can use either memory tables
(in a Memory database) or Temp tables.

What are the differences in terms of performance and scope between the
two in EDB?  (Trying to decide which way to go.)

--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Tue, Nov 27 2007 1:00 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gordon,

<< In DBISAM I used memory tables for temporary data (that lived for the
life of the application session).  In EDB I can use either memory tables (in
a Memory database) or Temp tables.

What are the differences in terms of performance and scope between the two
in EDB?  (Trying to decide which way to go.) >>

The issue with using in-memory databases is that you cannot reference
another database from within any catalog expression, routine, etc.  In other
words, any stored procedures, functions, triggers, etc. that are stored in a
catalog cannot reference metadata in another catalog.  That makes temporary
tables more versatile for all situations.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Nov 27 2007 2:43 PMPermanent Link

Gordon Turner
Is there any way to test for the existance of a temporary table?  (Like
the select * from Information.Tables query.)

Also, what is the life of a temporary table.  If the user gets
disconnected from the session due to inactivity, do the temporary tables
get lost?

I've used memory tables in the past, partly because they are user
specific, partly because I assumed that memory reads and writes were
faster that disk reads and writes.  Is this also true of temporary tables?

(It's been a looong time since I worked with temporary tables -
optimizing queries and procedures for DB2 on an IBM mainframe - so my
memory is a little vague.)
--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Wed, Nov 28 2007 8:54 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gordon,

<< Is there any way to test for the existance of a temporary table?  (Like
the select * from Information.Tables query.) >>

Not currently, no:

http://www.elevatesoft.com/scripts/newsgrp.dll?action=openmsg&group=17&msg=781&page=1#msg781

<< Also, what is the life of a temporary table.  If the user gets
disconnected from the session due to inactivity, do the temporary tables get
lost? >>

Disconnected, no.  However, if the session is removed completely, then the
temporary table will be dropped automatically when the last reference to the
database is closed.

<< I've used memory tables in the past, partly because they are user
specific, partly because I assumed that memory reads and writes were faster
that disk reads and writes.  Is this also true of temporary tables? >>

You most likely won't notice the difference between the two.  Temporary
tables are buffered quite a bit, so most of the operations take place in
memory anyways.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Nov 28 2007 10:50 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


>You most likely won't notice the difference between the two. Temporary
>tables are buffered quite a bit, so most of the operations take place in
>memory anyways.

Very interesting - much more than "normal" tables?

Roy Lambert
Thu, Nov 29 2007 4:42 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Very interesting - much more than "normal" tables? >>

Yes.  They're session-specific, so they are opened exclusively and buffered.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image