Re: How to select 1 record from 1M records fast ?

From: magicwand <magicwand_at_gmx.at>
Date: Thu, 15 Apr 2010 05:02:37 -0700 (PDT)
Message-ID: <4c2b41be-0d76-45ac-89ca-5bcb968741a8_at_c36g2000yqm.googlegroups.com>



On 15 Apr., 12:25, Jia Lu <roka..._at_gmail.com> wrote:
> Hi all
>
> DB:Oracle 11g R2 Standard One x64 on Linux
>
>  I created a table with 1,000,000 records.
> Then I select a,b from tbl where xx=xx.
> (With the real case we need do some joins)
>
> Question is how can I select one row fast.
> (maybe in 3 seconds)
>
> With the standard edition we cannot use partition
>  tables.
> Maybe we can tune it with creating indices.
>
> I need some advice on the case.
> Thanks a lot.
>
> Best
>
> Lau Lu

Suppose you have a book with 1.000.000 pages, and you want to find a certain chapter. What will be your preferred method ?

  1. Thumb through the book starting from page 1
  2. Look into the index and go to the page cited there

Hint: If your answer is a), leave everything as it is Received on Thu Apr 15 2010 - 07:02:37 CDT

Original text of this message