Data dictionary query takes too long.
HelloI'm using ORACLE DATABASE 11 g.
The following query takes too long to run and not give the result. As I've tried a few tricks SQL Oracle but it forces developed.
SELECT
distinct B.TABLE_NAME, 'Y'
FROM USER_IND_PARTITIONS A, USER_INDEXES B, USER_IND_SUBPARTITIONS C
WHERE A.INDEX_NAME = B.INDEX_NAME
AND A.PARTITION_NAME = C.PARTITION_NAME
AND C.STATUS = 'UNUSABLE'
OR A.STATUS = 'UNUSABLE'
OR B.STATUS = 'INVALID';
Please guide me what to do? to run this query in a fast paced mode...Thanks in advance...
Your query is incorrect. It returns all tables if A.STATUS = "UNUSABLE" or B.STATUS = "INVALID". Most likely, you meant:
SELECT
distinct B.TABLE_NAME, 'Y'
FROM USER_IND_PARTITIONS A, USER_INDEXES B, USER_IND_SUBPARTITIONS C
WHERE A.INDEX_NAME = B.INDEX_NAME
AND A.PARTITION_NAME = C.PARTITION_NAME
AND (C.STATUS = 'UNUSABLE'
OR A.STATUS = 'UNUSABLE'
OR B.STATUS = 'INVALID');
But the above will return sous-partitionnee tables not valid/no usable index. He ain't no non-sous-partitioned tables partitioned index/index not valid/not usable with same partitions in the form of tables not partitioned with valid/no unusable indexes. If you want to get any table with indexes not valid/not usable, you outer join that's going to hurt even more performance. I suggest you use the UNION:
SELECT DISTINCT TABLE_NAME,
'Y'
FROM (
SELECT INDEX_NAME,'Y' FROM USER_INDEXES WHERE STATUS = 'INVALID'
UNION ALL
SELECT INDEX_NAME,'Y' FROM USER_IND_PARTITIONS WHERE STATUS = 'UNUSABLE'
UNION ALL
SELECT INDEX_NAME,'Y' FROM USER_IND_SUBPARTITIONS WHERE STATUS = 'UNUSABLE'
) A,
USER_INDEXES B
WHERE A.INDEX_NAME = B.INDEX_NAME
/
SY.
Tags: Database
Similar Questions
-
Hello
The following query takes too long (more than 30 minutes), work with 11g.
The table has three columns RID, ida, geometry and index has been created on all of the columns.
The table has about 5,40,000 documents of point geometries.
Please help me with your suggestions. I want to select the geometry in double point where ida = STRING.
SQL > select a.rid, b.rid from totalrecords, totalrecords b where a.ida = 'CORD' and b.idat = 'CORD' and
sdo_equal (a.geometry, b.geometry) = 'TRUE' and a.rid! = b.rid order of 1,2;
concerningHello
Just glad it helped, don't forget to award points ;-).
The SDO_JOIN will use the spatial index for a spatial comparison.
First of all, it will use the index to check which geometries MBR interact, it is the primary filter: http://docs.oracle.com/cd/B28359_01/appdev.111/b28400/sdo_intro.htm#g1000087Secondly, you should apply a space MASK, pair of geometries that comes out of the primary filter is then compared according to the MASK, MASK for example = EQUAL, will check these pair of geoms are equal.
Now, because you have points, the members are the points themselves, so that if their MBR interact, points to interact, which means they are equal.
This means that the result of the SDO_JOIN points, in this case even a self-join, will give you all the points that are equal.But as points are also equal in their car, the join join reflexive sdo, will give you: a = b & one = one but also a b.
To this effect, you set the a.rowid< b.rowid,="" to="" avoid="" a="a" but="" also="" b="">I hope this explains it a little, again read and read great literature (early!), will have a better understanding.
Good luck
Luke
-
How can you know which application takes too long to run in a database? and most of the resources consumption?
user3636719 wrote:
How can you know which application takes too long to run in a database? and most of the resources consumption?Try to use the following text:
SELECT * FROM
(SELECT
sql_fulltext,
sql_id,
child_number,
disk_reads,
executions,
first_load_time,
last_load_time
V $ sql
ORDER BY DESC elapsed_time)
WHERE ROWNUM<>
;Also, try the v$ session_longops querying:
Select * from)
Select the target, sofar, less, totalwork.
units, elapsed_seconds, message
from v$ session_longops by start_time desc)
where rownum<>Kind regards
Rizwan Wangde
SR Oracle DBA.
http://Rizwan-DBA.blogspot.com -
How to stop the query takes too long
Is there a way to tell oracle to stop a query that takes too long to run?
I'm trying to end a way to prevent some users from running any querys that takes more than 2 minutes... any help?
I use 10g
Thank you!Hello
You can create a profile... and limit...
CREATE a PROFILE prof_low LIMIT
CPU_PER_CALL 3000 (about 30 seconds)
PRIVATE_SGA 500K
LOGICAL_READS_PER_CALL 1000;ALTER USER myuser PROFILE prof_low;
Concerning
Joao Oliveira -
Query takes too long, but the cost is low
Hi guys,.
I run a query on two databases that were created in the same way and have the same data.
On one, the cost is almost 1 million, and it runs in the space of a few seconds
On the other hand, the cost is 40,000, and it does not end execution
I looked at the plan to explain it and there is no Cartesian merge on the second query join, but it takes so long. What can I do to study this?
Thank youThe sqlxtplan provides comprehensive information on the query that was executed, or running, depending on the mode you choose. It has all the information of dbms_xplan plus much more. for example all the table definitions used in the query, filters of predicate query, plans for execution, his stats of all tables, indexes, etc... used in the query.
I find the way the fastest to get an overview of how the optimizer made its decision. If it is running run mode, it, rather than using the id of sql or hash, it also gives a 10053 trace. -
Hello
Could someone please help how to tune the query as its takes a long time to retrieve the results.
Select
col1,
col2,
col3,
COL4,
col5,
col6,
col7,
COL8,
col9,
col10,
Col11,
col12,
Sum (volume1),
Sum (volume2),
Sum (volume3),
Sum (volume4),
Sum (volume5),
Sum (volume6),
Sum (volume7),
Sum (volume8),
Sum (volume9),
Sum (volume10),
Sum (volume11),
Sum (volume12),
Sum (volume13),
Sum (volume14),
Sum (volume15),
Sum (volume16),
Sum (volume17),
Sum (Volume18),
Sum (volume19),
Sum (volume20),
Sum (rate1),
Sum (rate2),
Sum (rate3),
Sum (rate4),
Sum (rate5),
Sum (rate6),
Sum (rate7),
Sum (rate8),
Sum (rate9),
Sum (rate10),
Sum (rate11),
Sum (rate12),
Sum (rate13),
Sum (rate14),
Sum (rate15),
Sum (rate16),
Sum (rate17),
Sum (rate18)
Sum (rate19),
Sum (rate20)
Of
Table 1 - 13, 25, 99, 400 records
Table2 - 13, 45, 1000 records
Table 3 - 4, 50, 000 records
Table 4 - 1,00,000 records
table5 - 30 000 records
where tabl1.col1 = table2.col2,
Table1.Col1 = table3.col1.
table2.col2 = table3.col2...
Group
Sum (volume1),
Sum (volume2),
Sum (volume3),
Sum (volume4),
Sum (volume5),
Sum (volume6),
Sum (volume7),
Sum (volume8),
Sum (volume9),
Sum (volume10),
Sum (volume11),
Sum (volume12),
Sum (volume13),
Sum (volume14),
Sum (volume15),
Sum (volume16),
Sum (volume17),
Sum (Volume18),
Sum (volume19),
Sum (volume20),
Sum (rate1),
Sum (rate2),
Sum (rate3),
Sum (rate4),
Sum (rate5),
Sum (rate6),
Sum (rate7),
Sum (rate8),
Sum (rate9),
Sum (rate10),
Sum (rate11),
Sum (rate12),
Sum (rate13),
Sum (rate14),
Sum (rate15),
Sum (rate16),
Sum (rate17),
Sum (rate18)
Sum (rate19),
Sum (rate20)
Thank you
Prasad.
> Could someone please help how to tune the query as its takes a long time to retrieve the results.
The query you posted is obviously fake.
If you ask to give us a request that you do not post and we cannot see.
For real?
-
Query takes too long to run after clone
Hi all
We have a query that works well in our development environment and take about 15 seconds to run the query. When we run the same query with the same parameters in a recently cloned instance, the query takes 1200 dry run.
Please help us on this issue.
Thank you
RambaudThanks for any response.
We have solved the problem by using indicators of index.Thanks for the update!
-
create table query takes too long...
Hello experts...
I take the backup of table A, which consist of 135 million records...
Why use query below...
create the table tableA_bkup in select * from tableA;
It takes more time... always running...
is there another way to quickly query...
Thanks in advance...ECT is one of the fastest ways to do such a thing.
Do you remember the duplicate data. This means that if your table contains 50 GB of data, then it will have to copy these 50 GB of data.
Another way may be to use EXPDP to create a backup of the data of the table dump file. However I don't know if there is a difference in performance.
The two versions might benefit from parallel execution. -
Statement Update takes too long to run
Hi all
I am trying to run this update statement. But its takes too long to run.
UPDATE ops_forecast_extract b SET position_id = (SELECT a.row_id FROM s_postn a WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME))) WHERE position_level = 7 AND b.am_id IS NULL;
SELECT COUNT(*) FROM S_POSTN; 214665
SELECT COUNT(*) FROM ops_forecast_extract; 49366
What could be the reason for the update statement to run so long?SELECT count(*) FROM s_postn a, ops_forecast_extract b WHERE UPPER(a.desc_text) = UPPER(TRIM(B.POSITION_NAME)); 575
Thank youpolasa wrote:
Hi allI am trying to run this update statement. But its takes too long to run.
What could be the reason for the update statement to run so long?
You did not say what means "too long", but a simple and good reason might be that the scalar subquery on "s_postn" using a full table for each run scan. Potentially this subquery is executed for each row of the table "ops_forecast_extract" that satisfies your filter predicates. 'Potentially' due to "filter/subquery optimization" cunning of the Oracle execution engine that tries to cache results of already executed of instances of subquery. Given that the in-memory hash table that contains these cached results is limited in size, the optimization algorithm depends on the sort order of data and could suffer collisions of hash that it is unpredictable, how this optimization works in your particular case.
You can view the execution plan, it should at least tell you how Oracle will run the scalar subquery (that tell you nothing about this "filter/subquery optimization" feature).
Follow the generic guidelines how to generate a useful plan explain output and how to post here:
Could please post a correctly formatted explain you plan output using DBMS_XPLAN. SCREEN, including the 'Predicate information' section below the plan to provide more details about your statement. Please use the noformat} [{noformat} code {noformat}] {noformat} before tag and {noformat} [{noformat} / code {noformat}] {noformat} tag or after the noformat} {{noformat} code {noformat}} {noformat} tag before and after to improve the readability of the outing:
In SQL * more:
SET LINESIZE 130 EXPLAIN PLAN FOR
; SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY); Note that the DBMS_XPLAN package. DISPLAY is only available from 9i on.
In 9i and above, if "Predicate information" section is missing from the DBMS_XPLAN. Output display, but you get the message "Plan table is old version" instead, you must recreate your plan table using the script server '$ORACLE_HOME/rdbms/admin/utlxplan.sql '.
In previous versions, you can run the following in SQL * Plus (on the server) instead:
@?/rdbms/admin/utlxpls
A different approach in SQL * more:
SET AUTOTRACE ON EXPLAIN
; also displays the execution plan.
In order to get a better understanding where your statement passes the time, you might want to turn on SQL tracing as described here:
When your query takes too long...
and after the "tkprof' out here, too.
Kind regards
RandolfOracle related blog stuff:
http://Oracle-Randolf.blogspot.com/SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676 /.
http://sourceforge.NET/projects/SQLT-pp/ -
Inserting data in the remote table takes too long
Hello
I have a table in the remote database and insert the data into this particular table... takes too long.
Could you please advice me some tips for the DML can quickly...
Concerning
DASThat takes a lot of time, then don't you have an idea how can we send the data fast
Buy more band witdth?
No, honestly. As you can see, the quality of my answers match the quality of your question.
You must locate the bottleneck, where is - this "too much" time has passed.
Is it
collection of data on the local side?
net send?
Actual insertion on remote site?
Maybe you have a condition on the remote site, which causes the data sent to the remote side to local?Impossible to give advice without knowing anything about what is happening.
Concerning
Peter -
LaserJetPro HP 1102w impression takes too long
Hello
I installed HP 1102w on my laptop using the driver from the CD. Printing is configured using USB and ePrint is disabled.
Printing takes very long (18 s). When I send a print job (even test page), I don't see that it appears in the printer job window liquid. However until I see that some data has been sent to the printer (for example 4 KB / 146kb) time is about 9 seconds. To start sending data up to what the page is printed is another second 8-9 so time total is Reiver 18 seconds in the best of cases.
My laptop is:
Windows Visa Business, 3 GB of RAM, Dual-Core clocked at 1.6 GHZ, SSD drive 120 GB.
I tried to install the XPS (planned it will be faster) driver for this printer however failed to install with the 0x070c error code.
Please have a tip how to print faster (reduce the time of 8 seconds until that data is sent to the printer)
Thank you
Miro.
Hi @MKLI ,
I see by your post that the printer takes too long to print in a USB connection. I would like to help you today.
What kind of documents you print? (PDF, Txt)
Have what applications you tried?
Try a different file or application to see if you have the same results.
Try and print a self-test on the printer hardware to see if it is a hardware or software problem.
Printing a Configuration Page. Select the method two.
Make sure the printer is connected directly to a wall outlet and the USB cable is connected directly to the computer. The USB cable should not be more then 6 feet. Try a different USB port on the laptop. Some ports are higher power then others. You may need to try another USB cable to see if that causes this problem.
Check the power on the computer to see if that is causing the problem.
How to make in the Windows Device Manager?
Go to Device Manager, under Bus for each made USB root hub controllers right click and left click on properties, for the management of the power supply remove the check box for "allow the computer to turn off this device to save energy. It allows the computer to restrict or cut off the power for this unit.
Restart the spooler to print on the laptop.
Click Start (), type services.msc in the Search box and press ENTER.
Find the service named print spooler, right click and select Properties. Click on stop and then click Start. -
LaserJet pro m401dne: fatal error, takes too long to connect with the printer
Downloaded the driver of HP software, started installation and got to the point where it says to connect the printer, did, he recognizes it, start the data transfer and just takes forever. After ten minutes, I get fatal error takes too long to communicate with the printer, if aging persists restart the computer and try again.
I've made this 3 times now and same result.
Since my laptop doesn't have a cd drive, I copied the cd to a flash drive and installed the software from that. Worked perfectly. Something must be missing or corrupted download. Anyway problem solved
-
Windows update takes too long to find the updates
I had just installed a new hard drive on my laptop Dell inspiron N5050. I did a reinstall of system clean of my operating system to windows 7. After that, I started to run windows update to get all the necessary updates that I need to update completely from the computer. He has worked for a very long time with no result. In addition, at least 2 hours. all the settings for windows update is set to the settings recommended. but for some reason, in my view, takes too long to get updates. can someone help me please this possible issue
Hello Darrin,
Thanks for posting your query on the Microsoft Community.
According to the description, the Windows updates take a long time to find the updates.
I suggest to follow the methods below and check if that helps.
Method 1: If your computer is experiencing problems find and install updates of the operating system, try using the troubleshooter.to of update of Windows the problem fix. He makes sure your computer is connected to the Internet and checks to see if your network card and Windows Update services are running properly.
Reference:
Open the Windows Update troubleshooting tool
If the problem persists, try Method 2,
Method 2: run the clean boot: Place your system in the clean boot state helps determine if third-party applications or startup items are causing the problem. Check this question in the clean boot state.
Reference: How to perform a clean boot in Windows
http://support.Microsoft.com/kb/929135
Note: After the boot minimum troubleshooting step, read the sections "How to reset the computer to start as usual after a clean boot troubleshooting" in the link provided to return the computer to a Normal startup mode.
See also:
Problems with installing updates
Hope this information is useful. Let us know if you need more help, we will be happy to help you.
-
Windows 7 take too long to the mouse and keyboard anable.
Hello
I have replace my SSD HARD drive (2 hard drives 120 GB each RAID 0) w / Windows 7 Pro 64 bit. After the replacement windows take longer time to activate the mouse and the keyboard - 5/10 seconds.
I've updated the drivers for the two, but still have the same question. The boot is faster, but the mouse and keyboard take longer to wake up.Any help?
Thank you
M. Vilela
Hi MVilela,
Thanks for asking this question to Microsoft Community!
I understand that after the replacement of the hard disk of the computer takes too long to turn on the mouse and the keyboard.
Your Windows 7 is better suited in the TechNet forums. I suggest you to send your query there.
Here is the link: http://social.technet.microsoft.com/Forums/en-us/w7itproperf/threads
It will be useful. For any other corresponding Windows help, do not hesitate to contact us and we will be happy to help you.
Kind regards!
-
My PC just newly formatted and now I can see a problem when I turn it off, he just starts to day and after that it fails... I'm worried about what it takes too long... from 10:00 until 16:00? I read an article on them, she'll just take up to 20-30 minutes, but watch?
Is there something I can do? Can normally on my return from PC? or what I need to reformat?
Hi Andrei,
Thanks for posting your query in Microsoft Community.
I understand your concern, and we as a community will try to help you in the best possible way we can.
Here are solutions to some common problems with installing updates. You might be able to fix some problems automatically by running the Windows Update Troubleshooter.
I suggest you check out the link below and check if it helps.
"Configuration of the Windows updates failed. Restoration of the changes. Do not turn off your computer"error when you try to install Windows updates
https://support.Microsoft.com/en-us/KB/949358
Hope the information helps, if you have any additional questions, feel free to post. We are here to help you.
Kind regards
Guru Kiran
Maybe you are looking for
-
Why not download any apps?
I recently got a new iPhone 6s more with no backup iCloud and it works very well. From later last night, however, none of my apps will download. The circles just icon and the circles forever without stopping. I have 64 GB so it is not a question of s
-
GPIB488.2 head and lib files
I use NI GPIB-HS-USB for communication between the computer and the Dynamic Signal Analyzer(,DSA,SR785,made by Sranford.). I intend to schedule with VC6.0 and control the DSA with HS-GPIB-USB. Unfortunately, I can't find the file head NOR and circula
-
Aspire 5755G - 9417 larger capacity hard drive
Aspire 5755G - 9417 current (original) HD is 1 TB. I'm looking to replace it with a larger. Can I use one to 1.5 or 2 TB of HARD drive in this unit or is there a restriction on the ability? Also, the initial height of the disc is 12.5 mm. It seems th
-
Can we get along and the skinny on Dell's Active pens?
So I just bought a Dell Pro 11 Dell taking place. Screaming deal - $513 after shipping and taxes for a tablet of class business with a TPM, a good BIOS/UEFI (suck it, Surface) and accessible (including batteries!) internal material as well as delici
-
Since more than 30 days, I upgraded to windows 10 and I would LOVE to go back to windows 7. Have no idea where my product key could be.