Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7695617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:35:04+00:00 2026-05-31T21:35:04+00:00

1) My question is that, when i have two large table which cannot be

  • 0

1) My question is that, when i have two large table which cannot be alter because of there sizes.
Now i have to join them on a common field and now compare one field from both the table which is having same data but one’s data type is int and anothers is varchar.
I know we can done this easily, but when table have millions of record then comparing between two different data type is slow down, how can i make it fast.

2) my similar 2nd question is that when i have to join two tables on some field like id and which is in different data type in both the table. like one is int and another is char…..how can i join this two table because i cannot wait for many days.

(One solution i have tried is to create new table as an abstract(by in file out file) of old . While i have now changed the data type from char to int during create table and then took the in file)

If anybody have any other solution, please share

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:35:05+00:00Added an answer on May 31, 2026 at 9:35 pm

    Make sure the conversion happens on the first table in the join, that way:

    1. the conversion only happens only once per row
    2. indexes can be used to join with the second table

    for example:

    select * 
    from table1
    join table2 on table2.intcol = cast(table1.varcharcol as signed)
    

    This sample query will use an index on table2.intcol (if one exists) to join the two tables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question: I have two MSSQL tables, items and states, that are
MVC newbie question re binders. Supposing I have two strongly typed partial actions that
Ok, NHibernate question here. I have two objects that I would like to map
I have a two part question Best-Practice I have an algorithm that performs some
I have large table. consisting of only 3 columns (id(INT),bookmarkID(INT),tagID(INT)).I have two BTREE indexes
Short version of the question: If you have a table with a large number
I have two tables that I need to join... I want to join table1
Lets say that I have two tables. Table 1 is a list of vendors
I have a table with around 19 columns which contains reasonable large amount of
I have two models (questions and answers) that slightly follow the popular Railscasts :

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.