?
Solved

Insert into database

Posted on 2006-04-09
1
Medium Priority
?
630 Views
Last Modified: 2012-06-27
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
Comment
Question by:tonelm54
1 Comment
 
LVL 30

Accepted Solution

by:
todd_farmer earned 2000 total points
ID: 16412272
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

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question