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 7189157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:14:33+00:00 2026-05-28T19:14:33+00:00

Is the query below correct to find columns for which the HashCode is the

  • 0

Is the query below correct to find columns for which the HashCode is the same but PageUrl different rows? This would mean basically collisions in my database planning.

select T1.PageUrl,T1.HashCode from tblPages as T1 inner join
(select PageUrl,HashCode from tblPages group by PageUrl,HashCode) as T2 on
T1.PageUrl!=T2.PageUrl and T1.HashCode=T2.HashCode

I am using 64 bit HashCode.

MS-SQL 2008 R2

  • 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-28T19:14:33+00:00Added an answer on May 28, 2026 at 7:14 pm

    I’d use a CROSS JOIN with a WHERE clause rather than your INNER JOIN.

    SELECT T1.PageUrl,T1.HashCode FROM tblPages AS T1
    CROSS JOIN (SELECT DISTINCT PageUrl,HashCode FROM tblPages) AS T2
    WHERE T1.PageUrl <> T2.PageUrl AND T1.HashCode = T2.HashCode
    

    The reason for this is that the optimizer will give you a better query plan with the cross join. Link to an example.

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

Sidebar

Related Questions

If yes, the first query below should be correct, but shows error ORA-00979: not
My native query below is working fine oracle sqlplus. But through JPA native query,
I'm looking for help with my query below. which is never returning anything for
What would be the search condition for the query below if we wanted to
I have RO access on a SQL View. This query below times out. How
Ok, this seems simple but I can't find a solution to save my life.
I am trying to use the query below (which works perfectly), as a subquery
I'm trying to find out why this entire code below is producing only ONE
I have a relatively complex query that I'm running. I've included it below, but
We have the query below. Using a LEFT OUTER join takes 9 seconds to

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.