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

  • Home
  • SEARCH
  • 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 41107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:07:42+00:00 2026-05-10T15:07:42+00:00

Does anyone know why in Oracle 11g when you do a Count(1) with more

  • 0

Does anyone know why in Oracle 11g when you do a Count(1) with more than one natural join it does a cartesian join and throws the count way off?

Such as

SELECT Count(1) FROM record NATURAL join address NATURAL join person WHERE status=1 AND code = 1 AND state = 'TN' 

This pulls back like 3 million rows when

SELECT * FROM record NATURAL join address NATURAL join person WHERE status=1 AND code = 1 AND state = 'TN' 

pulls back like 36000 rows, which is the correct amount.

Am I just missing something?

Here are the tables I’m using to get this result.

CREATE TABLE addresses ( address_id           NUMBER(10,0)  NOT NULL, address_1            VARCHAR2(60)  NULL, address_2            VARCHAR2(60)  NULL, city                 VARCHAR2(35)  NULL, state                CHAR(2)       NULL, zip                  VARCHAR2(5)   NULL, zip_4                VARCHAR2(4)   NULL, county               VARCHAR2(35)  NULL, phone                VARCHAR2(11)  NULL, fax                  VARCHAR2(11)  NULL, origin_network       NUMBER(3,0)   NOT NULL, owner_network        NUMBER(3,0)   NOT NULL, corrected_address_id NUMBER(10,0)  NULL, 'HASH'                 VARCHAR2(200) NULL );  CREATE TABLE rates ( rate_id      NUMBER(10,0) NOT NULL, eob          VARCHAR2(30) NOT NULL, network_code NUMBER(3,0)  NOT NULL, product_code VARCHAR2(2)  NOT NULL, rate_type    NUMBER(1,0)  NOT NULL );  CREATE TABLE records ( pk_unique_id      NUMBER(10,0) NOT NULL, rate_id           NUMBER(10,0) NOT NULL, address_id        NUMBER(10,0) NOT NULL, effective_date    DATE         NOT NULL, term_date         DATE         NULL, last_update       DATE         NULL, status            CHAR(1)      NOT NULL, network_unique_id VARCHAR2(20) NULL, rate_id_2         NUMBER(10,0) NULL, contracted_by     VARCHAR2(50) NULL, contract_version  VARCHAR2(5)  NULL, bill_address_id   NUMBER(10,0) NULL ); 

I should mention this wasn’t a problem in Oracle 9i, but when we switched to 11g it became a problem.

  • 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. 2026-05-10T15:07:43+00:00Added an answer on May 10, 2026 at 3:07 pm

    My advice would be to NOT use NATURAL JOIN. Explicitly define your join conditions to avoid confusion and ‘hidden bugs’. Here is the official NATURAL JOIN Oracle documentation and more discussion about this subject.

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

Sidebar

Ask A Question

Stats

  • Questions 212k
  • Answers 212k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Well the simplest way would be to make some kind… May 12, 2026 at 10:20 pm
  • Editorial Team
    Editorial Team added an answer They're kept under Tomcat's work directory, e.g. work/Catalina/localhost/_/org/apache/jsp/login_jsp.java The specifics… May 12, 2026 at 10:20 pm
  • Editorial Team
    Editorial Team added an answer It depends on what your hosting provider allows. Some allow… May 12, 2026 at 10:20 pm

Related Questions

I've a terrible memory. Whenever I do a CONNECT BY query in Oracle -
All, I am very new to stored procedures in general but I am struggling
If I have a column in table with field of type VARCHAR(15) and if
I've noticed in .net its extremely easy to reverse engineer exe's. Is this because

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.