所有问题: [innodb]

118 个问题

类似标签:
4
投票
2答案
4528 次观看

mySQL-使用PHP的mysqli设置隔离级别

如何使用mysqli在PHP中将事务的隔离级别设置为“ SERIALIZABLE”?我到处都是,却找不到任何信息。 此处是隔离级别的说明。

6
投票
2答案
1198 次观看

什么时候可以将表从MyISAM更改为InnoDb了?

这个问题就像我上一个问题的延续: 我正确吗InnoDb比MyISAM更适合频繁并发更新和插入? 但是这次我有具体的问题。 我们知道,当我们没有很多并发更新(插入)时,MyISAM比InnoDb快。当我们有许多并发更新时,MyISAM表将被锁定,所有其他客户端都应等待。 1)但是何时应该从MyISAM更改为InnoDb?每秒更新1次?每秒10次更新?每秒钟100次更新? 2)举一个具体的例子,将网站上的其中一张表更改为InnoDb更好吗?在该表中,我通常每分钟(从不同的会话)每分钟更新一次,但有时每秒可以更新约2-3次?

3
投票
2答案
3448 次观看

MySQL-使用mysqli应用行级锁

使用PHP的mysqli如何应用行级锁? 行级锁定会阻止任何人编辑当前符合您条件的行,对吗?但是它们会阻止用户插入符合您条件的行吗? 谢谢

2
投票
2答案
733 次观看

我是否正确,InnoDb比MyISAM更适合频繁并发更新和插入?

我们有一个网站,每天有数百名访问者,每天有成千上万的查询。 因此,数据库中的某些表很少更新,有些表每分钟更新几次,而有些表则每秒更新约10次。 MyISAM使用表级锁定进行更新,而InnoDb使用行级锁定。 因此,据我所知,对于具有频繁并发更新(每秒多次更新)的表,最好将它们设置为InnoDb,对于其他表(当然,如果我们不需要事务和外键,则更好))可以使用MyISAM引擎。 我的想法对吗?

3
投票
2答案
1528 次观看

MySQL InnoDB是否总是为每个外键约束都要求一个索引?

我正在使用phpMyAdmin。为了用InnoDB设置外键约束(在“结构”选项卡上的“关系视图”链接下),看来我需要为要添加约束的字段添加索引。显然,这会影响表上插入/更新的性能,尤其是在有几个要添加的约束的情况下。是否可以在InnoDB中指定外键约束或关系完整性,而无需为必填字段创建索引? 非常感谢 伦敦JS

0
投票
1答案
149 次观看

InnoDB事务帮助-如果未找到,则选择然后添加唯一行

我有一个包含IPAddress部分的mysql表 TABLE `EndPoints`( `EndPointId` BIGINT(19) UNSIGNED NOT NULL AUTO_INCREMENT , `IpPart1` TINYINT(3) UNSIGNED NOT NULL , `IpPart2` TINYINT(3) UNSIGNED NOT NULL , `IpPart3` TINYINT(3) UNSIGNED NOT NULL , `IpPart4` TINYINT(3) UNSIGNED NOT NULL , PRIM...

3
投票
2答案
877 次观看

MySQL存储引擎决策

我是一位来自荷兰的网页设计师。我是从头开始构建Web应用程序的新手,我一直使用CMS并对其进行了自定义。 我正在php / mysql中构建一个拍卖网站,该网站已完成。最近,我读了一些有关存储引擎的文章。 我有一些问题困扰了我一段时间: 哪种存储引擎最适合我的网站,我是否使用myIsam,innodb等? 我正在建立的网站是一个拍卖网站,它必须每秒处理几次读写操作!!它必须检查拍卖是否开放,关闭,暂停,当前价格等。 我知道不是我的数据库中的所有表都可以访问,它们只有3个。它们当前都是myIsam。这个好吗?我应该全部改变吗?不变吗?我真的不知道该怎么办。 我是否要更改它...

4
投票
4答案
3757 次观看

大型mysql(innodb)数据库-查询性能降低,表消失以及恢复备份时间长

我有一个数据库,其中有3个表,每个表的行超过2000万。我已经将GUID用作主键(不幸的是)。现在我们的数据库约为20GB,并且每月增长5GB。 对数据库进行完整备份大约需要2个小时,而在具有4GB RAM的盒子上进行恢复则需要30个小时。 我们曾经使数据库中的所有表都消失了。除了一个服务器之外,同一服务器上的其他mysql数据库都可以正常运行-对于该数据库,仅数据消失了,留下了空表。 一个选择查询(在许多慢查询中)-在20m表之一中获取日期列的最大值,大约需要5分钟才能返回结果。该查询使用非常频繁。 我在寻找什么答案 建议的数据库设计更改 改进选择查询性能的方法-20m条记...

5
投票
5答案
3264 次观看

页面,范围,段,表空间

Mysql的Innodb具有页面,范围,段,表空间的概念,但是我不知道它们如何相互影响。它们有什么关系?一个表空间有16K页是什么意思?这与物理行有何关系?内存中的“页面”有什么用? 我认为Oracle可能具有相同的概念,但是我不确定在哪里寻找它。有一篇很好的参考书/书详细讨论了这一点吗?

3
投票
5答案
3712 次观看

在构建集群存储时,MyISAM引擎比InnoDB更可取吗?为什么会这样呢?

我今天在接受Java开发人员采访时听说了这一点。我不得不列出MyISAM优于InnoDB的一些优点,以及为什么它仍被广泛使用。他们正等待着我的回答,即这个问题的标题。 据我对他们自己的回答的理解:MyISAM没有外键,并且数据库可以轻松地集群(例如,每个服务器一个表)。但是为什么我们不能简单地创建没有外键的InnoDB表呢?这种解释对我来说听起来很奇怪。

3
投票
3答案
2561 次观看

MySQL InnoDB locking only the affected rows?

I have an InnoDB table containing users, like this: +--------------+-----------------------+ | user_id | name | +--------------+-----------------------+ | 1 | Bob | | 1 | Marry | | 2 | Bob ...

34
投票
1答案
19553 次观看

MySQL - How to ORDER BY RELEVANCE? INNODB Table

I've got about 20,000 rows in an INNODB table called 'cards', so FULLTEXT is not an option. Please consider this table: id | name | description ---------------------------------------------------------- 1 John Smith Just some dude 2 Ted Johnson Another d...

1
投票
5答案
18385 次观看

Set AUTO_INCREMENT starting value in a InnoDB table to zero?

Is there any to get the an AUTO_INCREMENT field of a InnoDB to start counting from 0 not 1 CREATE TABLE `df_mainevent` ( `idDf_MainEvent` int(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`idDf_MainEvent`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

0
投票
1答案
4234 次观看

MySQL InnoDB CASCADE?

I am starting to experiment with using InnoDB in web applications. I've setup some tables with a foreign key, but they are not behaving as expected. Here are my table CREATE statements: CREATE TABLE sections ( section_id INT NOT NULL AUTO_INCREMENT, title VARCHAR(30), cre...

0
投票
2答案
117 次观看

Which tables will be locked with this query?

I am migrating data between two tables using the query below. I had table locking issues, so I am considering changing the table engines from MyISAM to InnoDB. Which tables do I need to do that for? Just the table I am writing to, or both the table I am writing to and the one I am reading from? ...

0
投票
2答案
5339 次观看

during magento installation i got Database server does not support InnoDB

I am trying to install latest magento version on jaquarpc. When i entered the database name,username and password it throws an error saying Database server does not support InnoDB storage engine Database connection error I also referred to magento forums..http://www.magentocom...

53
投票
10答案
43391 次观看

Hibernate: Create Mysql InnoDB tables instead of MyISAM

How can I get Hibernate (using JPA) to create MySQL InnoDB tables (instead of MyISAM)? I have found solutions that will work when using Hibernate to generate an SQL file to create the tables, but nothing that works "on the fly".

2
投票
2答案
1359 次观看

MySQL Query Questions with a Foreign Key Database

Here's some background info. I have three MySQL tables (all InnoDB). The first table is used to store images records. The second table is used to store tags (to tag the images with. OMG). The third table is used to store relationships between the images and the tags. Yippee. Here's the structure ...

3
投票
6答案
8599 次观看

Is InnoDB sorting really THAT slow?

I had all my tables in myISAM but the table level locking was starting to kill me when I had long running update jobs. I converted my primary tables over to InnoDB and now many of my queries are taking over 1 minute to complete where they were nearly instantaneous on myISAM. They are usually stuc...

1
投票
2答案
1294 次观看

How to select the MySQL's engine name of some table by sql query?

How to select the MySQL's engine name of some table. MyISAM or InnoDB. Can we do it by a simple sql query?

1
投票
2答案
384 次观看

Find out which tables were affected by Triggers

In MySQL (particularly InnoDB) is there any way to know which tables were affected (updated / deleted rows) by CASCADE UPDATES / DELETES or regular triggers?

9
投票
3答案
7014 次观看

Is using char as a primary/foreign key a no no?

Consider that there is a bunch of tables which link to "countries" or "currencies" tables. For making data easier to read I'd like make CHAR field with country code (eg US, GB, AU) and currency code (USD, AUD) a primary keys in each of those 2 tables and all other tables will use this CHAR as a ...

1
投票
7答案
1845 次观看

Use of MD5(URL) instead of URL in DB for WHERE

I have a big MySQL InnoDB table (about 1 milion records, increase by 300K weekly) let's say with blog posts. This table has an url field with index. By adding new records in it I'm checking for existent records with the same url. Here is how query looks like: SELECT COUNT(*) FROM `tablename` WH...

0
投票
2答案
87 次观看

Database directory disappeared

One of my clients complained that his database disappeared without any reason. I guess he must have dropped the database by mistake. But I just want to make sure that this can not happen automatically. The ibdata and iblog files are there but the directory (for e.g. company) is missing.

93
投票
9答案
70988 次观看

Fulltext Search with InnoDB

I'm developing a high-volume web application, where part of it is a MySQL database of discussion posts that will need to grow to 20M+ rows, smoothly. I was originally planning on using MyISAM for the tables (for the built-in fulltext search capabilities), but the thought of the entire table bein...

2
投票
2答案
3459 次观看

Fork MySQL INSERT INTO (InnoDB)

I'm trying to insert about 500 million rows of garbage data into a database for testing. Right now I have a PHP script looping through a few SELECT/INSERT statements each inside a TRANSACTION -- clearly this isn't the best solution. The tables are InnoDB (row-level locking). I'm wondering if I ...

0
投票
4答案
121 次观看

Should I be using InnoDB for this?

I am developing a personal PHP/MySQL app, and I came across this particular scenario in my project: I have various comment threads. This is handled by two tables - 'Comments' and 'Threads', with each comment in 'Comments' table having a 'thread_id' attribute indicating which thread the comment b...

4
投票
2答案
33655 次观看

MySQL InnoDB tables corrupt -- how to fix?

While performing a conditional DELETE operation in one of my InnoDB tables, which apparently required some temporary table to be created in ibdata1, the hard disk filled up and mysql crashed. I couldn't get it to start again until I deleted the ibdata1 file (~30 GB). Now mysql starts again, but ...

0
投票
2答案
187 次观看

Migrate InnoDB tables to PBXT

Is there any migration procedures or tools to migrate a Database (Liferay database to be exact) from InnoDB to PBXT?

1
投票
1答案
335 次观看

Add index on column or not?

I have a table looking like this: CREATE TABLE `item` ( `id` int(11) NOT NULL auto_increment, `title` varchar(255), `my_number` int(10) unsigned default NULL ); There are a hundreds of thousands of items, and I usually order them by 'my_number'. Will adding an index on 'my_number' increase pe...