Tagged Questions
3
votes
2answers
135 views
Tablestructure for fast inserts/deletes with foreign keys
Current Situation
We have a table called c with ca. 300,000 rows. In this table we store the competitors for a specific product.
Example:
id | competitors | some infos about competitor | ...
2
votes
1answer
153 views
MySQL Unique Index Keylength
I am hashing keys from one table that provides a 256 bit (64 char length) alphanumeric string that I intend to use in a second table as a foreign key.
The engine of choice here is InnoDB.
There are ...
1
vote
3answers
155 views
Mysql error while creating FK
here is structure of both tables
category table
CREATE TABLE category (
`catID` bigint(20) NOT NULL AUTO_INCREMENT,
`title` varchar(60) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT ...
2
votes
1answer
359 views
MySQL 5.5.8 InnoDB Foreign Key, JOIN performance
We are using aws/rds, MySQL 5.5.8. all InnoDB.
For performance purposes, we have merged some data-elements into varchar fields; mini-sized int and date type fields; added covering indexes; ...
2
votes
2answers
232 views
Foreign key constraints with MySQL/InnoDB
I am try to do some performance testing with varchar foreign keys vs int foreign keys and was wondering how foreign key constraints effect performance of MySQL.
I assume that they effect ...
1
vote
2answers
2k views
How to use RESTRICT for Foreign Key in mysql?
In the database structure of
CREATE TABLE Country (
name varchar(40) NOT NULL,
PRIMARY KEY (name)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE City (
name varchar(40) NOT NULL,
...
1
vote
2answers
433 views
Usage of RESTRICT or No ACTION in FOREIGN KEY Constraints
Sorry if this question is naive, but I was unable to understand possible usage of RESTRICT or No ACTION. Consider a simple database of
CREATE TABLE column1
(
first_id int(11) NOT NULL AUTO_INCREMENT,
...
2
votes
3answers
293 views
What is the optimal solution for converting a database schema?
I actually want to get rid of the existing constraints in the database which I know sounds crazy but we are upgrading our application to a new framework which relies on the foreign key constraint ...
2
votes
1answer
555 views
Will a row update check all child tables which have foreign key relationships in InnoDB?
I have a master table and around 60 to 70 child tables, all are InnoDB tables and have foreign key relationships with the master table.
Foreign key relations are On-Delete Cascade and On-Update ...
1
vote
1answer
214 views
InnoDB Foreign key updating vs. manual in-application updating
I've been working on a "legacy" schema in MySQL Workbench that uses a lot of relations. All of the tables are MyISAM, however, and there are no foreign keys.
However, I'm working on a new area of the ...
2
votes
1answer
131 views
InnoDB foreign key and index duplication?
I'm have a part table like this:
part_id INT
manufacturer_id INT
supplier_id INT
part_number VARCHAR(50)
part_description VARCHAR(120)
with foreign ...