Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> query performance

query performance

From: Raan <raan0101_at_gmail.com>
Date: Sun, 21 Oct 2007 19:27:55 -0700
Message-ID: <1193020075.152965.261520@i13g2000prf.googlegroups.com>


Hi All

i have one query

i have information about some people , these people have mulitple addresses(2-4) and multiiple phone numbers(3-10).

I have created table like following

people_table
peopleid , name , age , profession , sex

Address_table
address_Id,peopleid , address

phone_number_table

phone_number_Id,
peopleid , phone

The problem is that if i want to know the information about people with name "john"

then i have to run many queries

first query is
select peopleid , name , age from people_table;

second query
in loop according to the rslt obtained
select address from Address_table where peopleId = ID_OBTAINED

third query.. again in loop
select address from phone_number_table where peopleId = ID_OBTAINED

Is there any better for solving my problem. I think my db design or way of querying is poor.

thnx
Raan Received on Sun Oct 21 2007 - 21:27:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US