473,382 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

be careful with size of keys being used in joins

Hi, I want to share my experience with you. If you have large tables,
and you are doing joins, be extra careful that the keys in the joins
have exactly the same size (and type). Don’t mix mediumint and int
for example.

There is a huge performance hit if your join keys are not the same
size. This IS documented on mysql.com, but not everyone reads
everything :D

Just beware!

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/mySQL-carefu...ict255010.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=880349
Sep 12 '05 #1
2 1543
"steve" <Us************@dbForumz.com> wrote in message
news:4_***************************************@dbf orumz.com...
Hi, I want to share my experience with you. If you have large tables,
and you are doing joins, be extra careful that the keys in the joins
have exactly the same size (and type). Don't mix mediumint and int
for example.

There is a huge performance hit if your join keys are not the same
size. This IS documented on mysql.com, but not everyone reads
everything :D

Just beware!


Owwwhhh! So that's it.
It is documented and I didn't read it.

Thank you Steve
Thomas Bartkus
Sep 13 '05 #2
"" wrote:
"steve" <Us************@dbForumz.com> wrote in message
news:4_***************************************@dbf orumz.com...
Hi, I want to share my experience with you. If you have

large tables,
and you are doing joins, be extra careful that the keys in

the joins
have exactly the same size (and type). Don't mix mediumint

and int
for example.

There is a huge performance hit if your join keys are not

the same
size. This IS documented on mysql.com, but not everyone reads
everything :D

Just beware!


Owwwhhh! So that's it.
It is documented and I didn't read it.

Thank you Steve
Thomas Bartkus


I have spent AT LEAST A DAY dealing with all kind of weird mysql
errors (error .., mysql has gone away), which were solved by making
sure the join fields are the same. The problem is that there is no
way to tie the error to the this problem.

--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/mySQL-carefu...ict255010.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=881602
Sep 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
by: Robert Brown | last post by:
Let's say I have a type hierarchy: (just an example) the general entity customer: CREATE TABLE customer(customer_id int, customer_name varchar(250), customer_type int) three specific...
2
by: Randy Harris | last post by:
How can I join two tables on more than one field? In the query grid if I do that I get the ambiguous outer join error. I "kludged" it by creating a query for each table with a field computed from...
5
by: Ross A. Finlayson | last post by:
Hi, I'm scratching together an Access database. The development box is Office 95, the deployment box Office 2003. So anyways I am griping about forms and global variables. Say for example...
115
by: LurfysMa | last post by:
Most of the reference books recommend autonum primary keys, but the Access help says that any unique keys will work. What are the tradeoffs? I have several tables that have unique fields. Can...
4
by: Ted | last post by:
Understand, I have developed a number of applications using RDBMS, including MySQL, PostgreSQL and MS Access, but this is my first experience with MS SQL. I'd bet my bottom dollar that MS SQL...
3
by: costantinos | last post by:
Hello. I have a map map<int, vector<int and I want to find which one of the vectors has the most elements. Is there a built in function that does that or do I have to write my one code. ...
6
by: mac | last post by:
Summary: 1. I want to define a column in anMS Access table to be lookups on other tables. 2. The table that is the data source (e.g the "parent" table) has a composite primary key. 3. When...
6
by: Jim | last post by:
I tried to build a "form" layout without using table like this http://www.coolshare.com/temp/images/css.jpg In order to get the layout, I need to set the light blue area at each line to a fix...
4
by: Peter | last post by:
I am interested in informed feedback on the use of Constraints, Primary Keys and Unique. The following SQL statement creates a Bands tables for a database of bookings Bands into Venues, where the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.