How to figure out a query with too many subqueries [closed] - oracle

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I've been given a big query to figure out. But there are so many subqueries that it's nearly impossible.The number of subqueries is about 15-20.What do you suggest I do?

What I usually do when confronted with such monsters is:
Replace old style joins with new style ones
Modularize every non-trivial subquery into "virtual" tables using the with statement, for example:
with
subquery1 as (select /*big query*/ ),
subquery2 as (select /*big query*/ )
select *
from ...
join subquery1
where foo in (select foo from subquery2)
At that point some patterns emerge and more often than not the query can be rewritten in a sensible way.

The first thing I would do is to issue an explain plan to see how the DBMS would execute the query and go from there.

Related

MS Dynamics CRM Quick Search [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I would like to look for record among records of entities Leads, Opportunities, Accounts. That's mean I can select Leads from Sales and after that I can to find records from Leads, Opportunities and Accounts. Is it possible?
I interpret your question that you'd like to search across more than one entity in one search. That you would like your query to be searched in Leads, Opportunities and Accounts in the same time. In the OOTB functionality you cannot do this, however the guys over at PowerObjects has a third party solution for this kind of stuff called PowerGlobalSearch. You can read about it here and see if it's something that could help you: http://www.powerobjects.com/add-on-subscriptions/powerpack/powerglobalsearch/

About monads and LINQ [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I stumbled upon some statements suggesting that LINQ is powered by monads.
Several C# programmers have asked what a monad is and how it's like LINQ. But I'm a Haskell programmer, and I'm asking what LINQ is and how it's like having monads.
The little I know about LINQ is that it lets you write arbitrary SQL in the middle of your C# code. I'm told it's meant to be possible to implement LINQ for other datatypes, but I've never seen it done. Presumably that's the part where things get interesting. (?)
Any comments or helpful reading would be appreciated.

Optimizing deleting million rows in a SQL databse [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Imagine a situation when you have a table with 2 million rows and you wanted to delete a million rows. These rows are not bunched together. I might want to delete row1, and then row5, and then may be row7. But I want to deletes rows that may have age < 23 What is the best way to go about deleting these rows?
You will want to delete them in batches. This previous question provides some interesting answers.

Filtering List based on a nested list using LINQ [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Let's say we have a List of Projects and this list contains another list of Users.
How can I construct a LINQ query that let's say get me all the projects of a specific user based on his UserID?
Thanks.
Lets try something like this:
Projects.Where(pr => pr.Users.Any(us => us.ID == uid) )
I suggest to You read LINQ tutorial or here as well

How to update the table with large size update query in oracle? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I have large size of update query it is 320 Kb sql file. i can't execute that query/file.please help me i am using oracle 10g.only one column have that bulk data i used CLOB data type to the table.
I would try to execute it this way on Unix/Linux:
save the query to x.sql
sqlplus myuser/mypass#mydb
#x
If this does not work please include the relevant error codes and messages.

Resources