Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2007
    Posts
    130

    Unanswered: 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 08:00.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    what happened when you tested it?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Apr 2007
    Posts
    130
    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 10:12.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    nope, never done it

    that's why i was asking you

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Apr 2007
    Posts
    130
    i have tested on my database contains 200,000 records. There are not noticeable changes in execution time.

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    thanks for the update

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

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •