Tag Info

Hot answers tagged

7

Using OPTION (LOOP JOIN) isn`t suitable since it costs almost 15% more than MERGE JOIN The cost percentages displayed in showplan output are always optimizer model estimates, even in a post-execution (actual) plan. These costs likely do not reflect actual runtime performance on your particular hardware. The only way to be sure is to test the ...


2

Root Cause foreign_key_checks is not a global option you can preset at startup. Why ? When you click on that link to the Documentation on foreign_key_checks, there is no chart that says it is global or session scope. Other options will specify the scope in a chart ft_boolean_syntax says Variable Scope Global ; Dynamic Variable Yes innodb_doublewrite says ...


1

I'm not sure what you are saying here. Assume the following: CREATE TABLE PARENT ( a int not null primary key ); CREATE TABLE CHILD ( b int not null primary key , a int not null , constraint fk foreign key (a) references PARENT (a) ); insert into PARENT (a) values (1),(2); -- What should the default value of a be? insert into CHILD (b) ...


1

It's a foreign key error (Error: 1025 | errno: 150) you can find out using perror: root@onare:/home/onare# perror 1025 MySQL error code 1025 (ER_ERROR_ON_RENAME): Error on rename of '%-.210s' to '%-.210s' (errno: %d) root@onare:/home/onare# perror 150 MySQL error code 150: Foreign key constraint is incorrectly formed You can get more details about what ...


1

Your best bet is likely going to be to create a single child table that references all three of the other tables onto a single GAC_id. So you'd end up with something more like this: create table gac ( GAC_id, accelerometer_id, loadcell_id, potentiometer_id, primary key (GAC_id), foreign key (accelerometer_id) refrences ...


1

Properly normalized it will have 3 tables as follows: Kid kid_id (pk) classroom_id (fk to Classroom) Teacher teacher_id (pk) name Classroom classroom_id (pk) teacher_id (fk to teacher) This way you have no duplication and no update anomalies.



Only top voted, non community-wiki answers of a minimum length are eligible