Connecting Tech Pros Worldwide Help | Site Map

Optimize query(2)

  #1  
Old June 30th, 2009, 08:23 AM
Newbie
 
Join Date: Jun 2009
Posts: 2
Hello,
Several IDs noted by several sources. I would select all the IDs that are observed by all three sources. This applies only to data from the past 24 hours.

So far I have:

Select *
From db
Where id in ( Select id
From db
Where source = source_1)
And id in ( Select id
From db
Where source = source_2)
And id in ( Select id
From db
Where source = source_3)
And insertdate > (sysdate-1)

This query requires a lot of power. Can you think of a query that reported better performance than this?
Thanks!
  #2  
Old June 30th, 2009, 09:16 AM
Member
 
Join Date: Dec 2007
Posts: 47

re: Optimize query(2)


It may be better if you show us the format of your table(s). The information you have and what info you want out the table.
Reply

Tags
optimize, oracle, sql


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to optimize query acornejo answers 1 March 27th, 2008 08:03 PM
Optimize query newtophp2000@yahoo.com answers 4 November 21st, 2006 03:15 AM
Optimize query Michal Hlavac answers 0 November 23rd, 2005 12:27 AM
Optimize query: time of "single * IN(many)" > time of "many * IN(single)" Paul Janssen answers 3 November 12th, 2005 01:32 AM
optimize query?? Bruce D answers 6 July 20th, 2005 01:42 AM