Solved

Can't write indexes to table

Posted on 2014-10-06
6
658 Views
Last Modified: 2014-10-06
I'm using SQLyog and attempting to add an index to a table that consists of over 250,000,000 rows.

When I run this code:

ALTER TABLE Verizon ADD INDEX ( geo_coords_0 );

It runs for a little bit, but then I get this error:

Error Code: 1878
Temporary file write failure
(205999 ms taken)

Not sure how to proceed. Perhaps there's a timeout setting that I need to adjust? What do you think?

Thanks!
0
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 500 total points
ID: 40364607
I think you need more space on your server. How big is this table and how much free space does the MySQL database have available for its use?

Edit: Doing some guesstimates I estimate that each index needs between 1 to 2 GB of space for 250 million rows
0
 

Author Comment

by:brucegust
ID: 40364619
283,000,000 rows and I don't know about free space, although I'm thinking in light of the company I'm working for, there should be plenty of room.
0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 40364635
"Temporary file write failure" is what is says - an inability to write. That suggests either permissions or space to me. I cannot see it as being permissions as the MySQL database rarely has permission problems once it is up and running. That suggests space to me.

What OS are you running under?
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:brucegust
ID: 40364640
Beverley, I think I've figured out the problem. I ran the exact same command, as far as adding an index, on a table with the same structure, but with fewer rows (500,000,000). It ran no problem.

That being the case, I think I'm going to create a new table with the indexes already in place and then move records over to that new table from the other one incrementally.

Thanks for your input!
0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 40364655
"Alter table" creates a copy of the table in the same folder as the original table. It means that for a certain period you will need as much free space as the original table. For nearly 300 million rows I am guessing you will need a few GB spare (35GB or thereabouts).

Creating a new table with indexes may not solve the problem unless you delete records from one table when you have safely moved them to the other table. Look at the filesize for the current table and then compare that with the amount of free space available.
0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 40364665
Hi,

I just noticed that you accepted the solution whilst I was typing my previous reply. Good luck with it all and thanks for the points.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MySQL  on Tomcat 8 94
Determining creation & modification dates on MySQL tables 4 50
mysql ide 10 48
MySQL Query Using Up Memory 6 52
Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
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
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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