By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,667 Members | 2,084 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,667 IT Pros & Developers. It's quick & easy.

How to set up mysql temporary tables at startup

P: n/a
I like to create some temprary tables (in-memory tables) when mysql
starts up. How do I do that.

Thanks.

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/mySQL-set-te...ict224284.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=773056
Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"steve" wrote:
I like to create some temprary tables (in-memory tables) when
mysql starts up. How do I do that.

Thanks.


On further reading, I need heap tables, which are shared by all
connections. But the idea should be the same.
Jul 23 '05 #2

P: n/a
"steve" wrote:
On further reading, I need heap tables, which are shared by
all connections. But the idea should be the same.


anyone??
Jul 23 '05 #3

P: n/a
steve wrote:
"steve" wrote:
> On further reading, I need heap tables, which are shared by
> all connections. But the idea should be the same.


anyone??


The definition of heap tables stay around, according to the docs, but
the data within the table evaporates. So you don't have to create the
table at MySQL startup time, you just need to load it with data.

If you're on UNIX/Linux, you can edit the mysqld_safe script that starts
the MySQL daemon. Once the mysqld daemon has been started successfully
within that script, add a line to run the 'mysql' tool to execute a SQL
script which performs any commands you want, such as loading some data
into those heap tables.

If you run the MySQL Server on Windows, I don't have a solution to
suggest for you. There doesn't seem to be an equivalent to the
mysqld_safe script.

Regards,
Bill K.
Jul 23 '05 #4

P: n/a
"Bill Karwin1" wrote:
steve wrote:
"steve" wrote:

 > > On further reading, I need heap tables, which are
shared by
 > > all connections. But the idea should be the same.

anyone??


The definition of heap tables stay around, according to the
docs, but
the data within the table evaporates. So you don't have to
create the
table at MySQL startup time, you just need to load it with
data.

If you're on UNIX/Linux, you can edit the mysqld_safe script
that starts
the MySQL daemon. Once the mysqld daemon has been started
successfully
within that script, add a line to run the 'mysql' tool to
execute a SQL
script which performs any commands you want, such as loading
some data
into those heap tables.

If you run the MySQL Server on Windows, I don't have a
solution to
suggest for you. There doesn't seem to be an equivalent to
the
mysqld_safe script.

Regards,
Bill K.


Thanks, Bill. That is what I was missing. Did not realize that the
definitiion stays around, and was thinking of having to redefine the
table every time the server comes back on.

I currently use CacheLite to implement caching (I long for ASPís
Application variable). I am thinking of using temp tables instead,
but looks like they donít support text fields, so pretty limited.

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/mySQL-set-te...ict224284.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=778978
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.