• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 631
  • Last Modified:

Insert into database

CREATE TABLE v (v INT);

INSERT INTO v VALUES (1);

INSERT INTO v SELECT (SELECT MAX(v) FROM V) + v FROM v;
INSERT INTO v SELECT (SELECT MAX(v) FROM V) + v FROM v;
INSERT INTO v SELECT (SELECT MAX(v) FROM V) + v FROM v;
INSERT INTO v SELECT (SELECT MAX(v) FROM V) + v FROM v;
INSERT INTO v SELECT (SELECT MAX(v) FROM V) + v FROM v;
INSERT INTO v SELECT (SELECT MAX(v) FROM V) + v FROM v;
INSERT INTO v SELECT (SELECT MAX(v) FROM V) + v FROM v;
INSERT INTO v SELECT (SELECT MAX(v) FROM V) + v FROM v;
INSERT INTO v SELECT (SELECT MAX(v) FROM V) + v FROM v;

DELETE FROM v WHERE v > 300;

CREATE TABLE myProb (x INT, y INT, z INT);

INSERT INTO myProb (x, y, z) SELECT v1.v, v2.v, v3.v FROM v v1, v v2, v v3;

The idea is to create all variables possible. Although it seems to work and inserts 27000000 records the acuall datafile is only 3Kb, however I have a ibdata1 file which is 2Gb, how can I commit the data?
0
tonelm54
Asked:
tonelm54
1 Solution
 
todd_farmerCommented:
When you say "the actual data file", I presume you mean the .FRM file - right?  If so, this is not the actual data file - it contains only the table definition.  The actual data is in the ibdata file and is likely committed (unless you are running with autocommit off).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now