If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > May binary fields consume more time than ordanary fields

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-04-08, 06:53
cy163 cy163 is offline
Registered User
 
Join Date: Apr 2007
Posts: 127
May binary fields consume more time than ordanary fields

Hello ALL,
a table tb_A is created as
Code:
 create table tb_A (Word varchar(20) binary NOT NULL);
or created as
Code:
 create table tb_A (Word varchar(20) NOT NULL);
There is another table tb_B. It is created as
Code:
create table tb_B (Word varchar(20) binary  NOT NULL);
or as
Code:
create table tb_B (Word varchar(20) NOT NULL);
do the following query over tb_A and tb_B
Code:
SELECT
      Word
FROM
      tb_A, tb_B
WHERE
      tb_A.Word = tb_B.Word;
I wonder if the binary modifier would cause longer execution time?

Thanks

Last edited by cy163; 12-04-08 at 07:00.
Reply With Quote
  #2 (permalink)  
Old 12-04-08, 08:45
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
what happened when you tested it?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 12-04-08, 09:07
cy163 cy163 is offline
Registered User
 
Join Date: Apr 2007
Posts: 127
I would like to add the 'binary' to the Word column defination. Before doing that, i would like to have your opinion, since I have to redefine and re-create the table, consuming a lot of time. Do you have experience on this before.
thanks.

Last edited by cy163; 12-04-08 at 09:12.
Reply With Quote
  #4 (permalink)  
Old 12-04-08, 09:30
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
nope, never done it

that's why i was asking you

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 12-05-08, 00:02
cy163 cy163 is offline
Registered User
 
Join Date: Apr 2007
Posts: 127
i have tested on my database contains 200,000 records. There are not noticeable changes in execution time.
Reply With Quote
  #6 (permalink)  
Old 12-05-08, 00:23
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
thanks for the update

now i'll be ready in case anyone else asks that question

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On