innodb

InnoDB not supported by webhost. What now?

I was developing a small WAMP web application on my laptop, where I have an instance of mySQL running and I chose InnoDB for my DB engine. After several weeks' development I wanted to make it available to the public and found out the database server provided by my web host does not support InnoDB, only MyISAM. The create-and-populate sc...

how to analyze Query CPU time

Hello, How can I analyze the CPU time consumed by my Innodb queries? I have innotop, but I cant seems to find where it is. Thanks. ...

How to selectively dump all innodb tables in a mysql database?

Hi, I have a database called av2web, which contains 130 MyISAM tables and 20 innodb tables. I wanna take mysqldump of these 20 innodb tables, and export it to another database as MyISAM tables. Can you tell me a quicker way to achieve this? Thanks Pedro Alvarez Espinoza. ...

innodb_file_per_table doesn't work

Hello I am trying to use the innodb_file_per_table option of my mysql 5.0. my relevant my.cnf is: innodb_data_file_path = ibdata1:100M:autoextend innodb_file_per_table innodb_autoextend_increment = 100 but when i drop & recreate my schema & DB, i see the split files for tables, but they are too small! (they dont start fr...

MySQL innodb seeks vs. contiguous reads tradeoff

Would mysql (innodb) support a higher rate (queries per second) of queries like (A) or (B)? (A) SELECT * FROM t1 WHERE pkey BETWEEN 2000 and 2001 AND x > 300 In (A), the primary key selects a range of 800 rows. "x" is unindexed. there's one range lookup and 1 contiguous read of length 200kb. (B) (SELECT * FROM t1 WHERE pkey BETWEEN 20...

Why is this query slow? Should I use MyISAM rather than InnoDB here?

I'm getting these about 5 times an hour in my slow query logs: # Query_time: 11.420629 Lock_time: 0.000033 Rows_sent: 0 Rows_examined: 0 SET timestamp=1267487708; INSERT INTO record_lock (record_lock.module_id, record_lock.module_record_id, record_lock.site_id, record_lock.user_id, record_lock.expiration_date_time, record_lock.date_ti...

UUID performance in MySQL?

We're considering using UUID values as primary keys for our MySQL database. The data being inserted is generated from dozens, hundreds, or even thousands of remote computers and being inserted at a rate of 100-40,000 inserts per second, and we'll never do any updates. The database itself will typically get to around 50M records before w...

Is 20K reads going to make INSERTing into my table slow? How about a foreign key failure?

It's taking 10 - 11 seconds sometimes to INSERT into my table which has under a dozen records. I'm getting the following in my database's InnoDB status: 0.29 inserts/s, 0.03 updates/s, 0.09 deletes/s, 20365.73 reads/s. 20.37K reads/s Seems like a lot--do you agree? I'm not sure the 20K reads is all the same table, but it's quite poss...

How to improve MySQL INSERT and UPDATE performance?

Performance of INSERT and UPDATE statements in our database seems to be degrading and causing poor performance in our web app. Tables are InnoDB and the application uses transactions. Are there any easy tweaks that I can make to speed things up? I think we might be seeing some locking issues, how can I find out? ...

mysql: Optimizing query w/ mixed-ascendency ORDER BY

I have a large table (~1M rows now, soon ~10M) that has two ranked columns (in addition to the regular data): avg_visited, a float 0-1 representing a %age popularity; higher is better alexa_rank, an integer 1-N giving an a priori ranking The a priori ranking is from external sources so can't be changed. Many rows have no popularity y...

CHECK TABLE table_name; when using InnoDB

Assuming an InnoDB table, will the following command ... CHECK TABLE table_name; ... cause MySQL to ... a.) Check only the data content of the table b.) Check only the index content of the table c.) Check both the data content and the index content of the table ...

different databases for handling sessions...am I doing the right thing?

I'm looking for some advice on whether or not I should use a separate database to handle my sessions. We are writing a web app for multiple users to login and check/update their account specific information. We didn't want to use the file storage method on the webserver for storing session information, so we decided to use a database...

innodb lock wait timeout

As per the documentation link given below: When a lock wait timeout occurs, the current statement is not executed. The current transaction is not rolled back. (Until MySQL 5.0.13 InnoDB rolled back the entire transaction if a lock wait timeout happened. You can restore this behavior by starting the server with the --innodb_rollback_on...

MySQL Composite Foreign Key Insert Failing

I have 2 tables with a composite foreign key between the 2. When I try to insert a row into the child table, I get a restraint failure, even though the values exist in the parent table. Here's a overview of the parent table: CREATE TABLE `residual_reports` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `processor` enum('1','2','3...

question about InnoDB deadlock in MySQL?

I found this kind of interesting problem in MySQL InnoDB engine, could anyone explain why the engine always claim it's a deadlock. First, I created a table with a single row, single column: CREATE TABLE `SeqNum` (`current_seq_num` bigint(30) NOT NULL default '0', PRIMARY KEY (`current_seq_num`) ) ENGIN...

what are the difference between InnoDB and MyISAM.

what are the difference between InnoDB and MyISAM. Which one I can go for? any areas where one provides and other doesnot provide? IS there any technological limitations in any of the both types? Please help me to choose the right type for my project? ...

MySQL forgot about automatically creating an index for a foreign key?

After running the following SQL statements, you will see that, MySQL has automatically created the non-unique index question_tag_tag_id_tag_id on the tag_id column for me after the first ALTER TABLE statement has run. But after the second ALTER TABLE statement has run, I think MySQL should also automatically create another non-unique in...

How to find size of individual columns and indexes in mysql/innodb database?

SHOW TABLE STATUS LIKE 'foo' returns Data_length - size of all data, and Index_length - size of all indexes. What's the best way to get per-column and per-index breakdown? ...

deadlocks in the innodb status

Mysql sever has suddenly become very slow. There are no queries in the slow query log but the innodb status shows something like the following. Does it mean that it is due to innodb deadlock? if Yes, what is the way out? *************************** 1. row *************************** Status: ===================================== 100315 ...

MySQL - How to determine if my table is stored in RAM?

I'm running: MySQL v5.0.67 InnoDB engine innodb_buffer_pool_size = 70MB Question: What command can I run to ensure that my entire 50 MB database is stored entirely in RAM? ...