Which is faster in performance
Hi allI have a partition on the table according to the 5 data sources, i.e. the partition list. Table has about 100 KB of data.
gives better performance?
Select * from tab1 where source = 2;
or
Select * from tab1 partition (sr2);
Please suggest. As I need to use in queries using several of these tables.
Thank you
VJ
jvjmohan wrote:
I have a partition on the table according to the 5 data sources, i.e. the partition list. Table has about 100 KB of data.
gives better performance?
Select * from tab1 where source = 2;
or
Select * from tab1 partition (sr2);
Both are the same - a FTS of the contents of a single partition (assuming I read your comparison properly).
The problem with the 2nd approach is that uses a static reference to the partition. This cannot be a binding parameter. So let's say you have a 100 sheet music - there will be a 100 sliders in the shared pool for research as follows:
Select * from tab1 partition (sr1)
Select * from tab1 partition (sr2)
..
Select * from tab1 partition (sr100)
This is problematic. In PL/SQL (or), this means having to use dynamic SQL to create an SQL statement with the reference to the correct partition.
If the criteria of the partition is used, a single SQL cursor is necessary in the shared pool:
Select * from tab1 where source =: 1
And this slider can be used for all partitions of the table - as the value bound to the variable in the cursor, allows CBO to determine which partition to use (called partition size).
In General - by specifying a name of partition in the SQL query is incorrect. Lack of technique use perspective. And also bad from a data modeling perspective. Application code does give not record the database indexes to use for a selectSQL names. So why and then specify the name of a partition in a SQL Select ?
Inner layer of abstraction between database objects (indexes, partitions, constraints, etc.) and application SQL code, keep intact.
Tags: Database
Similar Questions
-
ETG vs. insert add in parallel (which is faster)?
Hi all
The oracle is 11.2.0.3 on a linux machine.
I would like to know what the most rapid between the ETG and insert add in parallel (not index).
----------------
case A: ETG
create table table_a nologging Parallels 32
as
Select / * + full (t) parallel (32 t) * / *.
of table_b t;
case B: table_a was established in nologgig mode without index.
Insert / * + full (t) parallel (32 t) * / into table_a
Select / * + full (b) parallel (32B) * / *.
of table_b b;
-----------------------
As far as I know, both use "direct path write."
According to my experience, both show similar performance.
I would like to hear your experience which is faster in general and in THEORY.
Thanks in advance.
Best regards.>
I would like to know what the most rapid between the ETG and insert add in parallel (not index).
. . .
in my test case, the two sql show similar performance.
>
How do you know? You don't post any case INSERT ADD then why don't test you what you posted and we seek clarification? -
Hello
There are millions of records from a table and have to perform multiple filtering on the same column, which is faster
table.column_name = 10
or
table.column_name = 20
or
table.column_name = 30
or
table.column_name = 40
or+_
table.column_name in (10,20,30,40)
Thank you
Vijay
Published by: jvjmohan on January 11, 2011 02:42Hello
There is so much difference in the two operators. in the case AND the requirements of thre must pass, only then you will get the output and there a lot of conditions
In operator, it will not compare an object to another... What ever is in the requirement, it will give the result.
IN operator within complexity... it will be faster.
-
Which is faster; Count (1) or count (*)?
We are in discussions Friday afternoon here on Monday...
And we wonder:
Which is faster; Count (1) or count (*)?
but above all:
WHY?In reality, there is no difference. There is a thread on the topic AskTom.
Given that a common urban myth that COUNT (1) is more efficient, using COUNT (*) is usually preferred just from the aesthetic point of view.
Justin
-
Which is faster a bit manipulation to the table or image using the vision
I have to perform an operation on an image. It involves the calculation of the new locations for the pixels for each pixel of the image. Which is the fastest way to do it. Manipulate the pixels as elements of the array for loops, or manipulate the pixels of an image using vision tools?
Thank you.
Hello
If you can use vision tools to make the manipulation of pixels, it is much faster.
Vladimir
-
Which is faster - IN or EXISTS?
Hello
I have a small doubt... Please advise me... !!
Exist is more IN more rapid because IN does not use the index at the time of the recovery but Exist uses Index at the time of extraction.
My question is... If there is no index on the table... then there is what will do? that time is faster IN or Exists?
see you soon
PrabhuI'm not sure I understand your last post. If you want to "specific information", which sounds like you want to have a reasonable understanding detailed how Oracle manages the two different buildings, and when one might be preferred over the other. If you don't want 'bulky info', however, which makes it sound like you don't want details. So I'm a bit confused.
If you don't want details, the answer is "it depends." For a given query, either IN or EXISTS may be more effective or that there may be no difference. In general, if the outer query returns a large number of lines and the inner query returns a small number of lines, IN would be probably more effective. If the outer query returns a small number of lines and the inner query returns a large number of lines, EXISTS would probably be more effective. In addition, it is potentially to try all variations and examine query plans if you are particularly concerned about performance.
If you don't want details, read discussions of Tom.
Justin
-
Hi all
I would like to get the opinion of the people. This thought just happened for me while I was reading some materials the other day.
And I have not found any topic which talks specifically about speed after searching the forum.
It is faster to initialize your controls/indicators using Invoke node OR write directly to the initial value of your local variables?
From my experience (not large), I have always used the invoke node to initialize controls or indicators.
But when I but this question, I did a simple reference point and it seems the local variable approach is faster, especially
If you have the large number of orders/lights to initialize.
Am I missing something here? The invoke node running something that writing a value of local variable would not do?
I thought since you need to set the initial state by default for the node to invoke anyway, why not just write the desired initial value
your local variables?
I would appreciate if someone can express his own opinion based on their experience and knowledge.
Thank you ~ ~
I may need another Cup of coffee this morning, you are in fact callling the reset by default on each individual control. My last despises, it is that you use the default method Vals.Reinitialize VI all failing. It will probably be a bit faster than the method on individual controls. Still not instant, if.
Are a few msec is worth to you? If so and you consider the local path, my advice is to group as many controls as possible into clusters for minimize you headaches.
-
NiMax tasks vs tasks created in the code which is faster?
I'm curious as to which is better to use, tasks created in NiMax or tasks created in the code? If I acquire 8 analog channels, there is a downside to create tasks in NiMax speed? I know there is less code involved but what about the time it takes for labview read the configuration file that contains the tasks that are defined in NiMax? There is a significant advantage in the code?
Thank you
Bryan
BryanSw wrote:
I'm curious as to which is better to use, tasks created in NiMax or tasks created in the code? If I acquire 8 analog channels, there is a downside to create tasks in NiMax speed? I know there is less code involved but what about the time it takes for labview read the configuration file that contains the tasks that are defined in NiMax? There is a significant advantage in the code?
Thank you
Bryan
I'd go with the third Option (which is the one I use) - set the task in the project. First of all, define the task in MAX, make sure it does what you want and you are happy with it. Then go into project, New, DAQmx task, and once again, to register in the project. Use one in the project, which "lives" with the project and not with MAX. If you need to change a parameter at run time, it is a great time to get some code...
Bob Schor
-
HotSync: Bluetooth or cable - which is faster
I wonder if there is a significant difference between Bluetooth and cable in terms of speed of synchronization. I have a Vista (Palm Desktop 6.2.2) with Centro. Blutooth seems convinient since no physical link between Centro and my PC is necessary. But I want the synchronization time could be shorter. Would it be shroter if I used the physical cable connection?
Cable clocks are certainly faster than bluetooth synchronization. You can always watch where your device is hung up the bluetooth synchronization. For example, once a month, I'll do a sync cable that I call a full synchronization. When I do synchronizations bluetooth I disable backup and disable media and just let my pim data sync and I don't see a significant difference.
Message relates to: Centro (Sprint)
-
I have a scénarion where I received a comment to replace the sliders of the Varray
Who is the fastest between the slider and VArray? and why?What you have shown with this pseudo-code is a process loop nested within PL/SQL.
In SQL, this is called a nested loops join. A loop through the primary table (external) and for each row in this table, hit the secondary table (inside).
So, if the loop of the outer table has a 1000 lines, it means an iterations of the loop of 1000. For each iteration, it means release of another cursor on the secondary table - essentially running a 1000 SQL selects on this internal table.
This is not suitable. Even if that SQL Select intern takes only a 100ms, each row of the outer table means that another 100ms is added to the total operating time. So performance wise, this structure is only a sensible approach when the outer loop table translates into a limited number of lines and therefore a limited number of iterations of the loop and a limited number of select on the inner table.
The problem you have is therefore not a problem of the use of the wrong structure coding as do not use VARRAYs (never forget the fact that a VARRAY and a cursor are totally different things).
The problem you have is a design problem. This approach to data processing through nested loops IS slow and IMPOSSIBLE to scale.
This is why the SQL engine uses not only the treatment of nested loop. It also has the transformation of hash join, merge join transformation and a bunch of other sophisticated algorithms.
And it is also why it is best to NOT code in PL/SQL nested loops, because the SQL engine has more algorithms in its arsenal to address this problem using a primitive nested loop.
The design approach you should consider must be based SQL. For example
// condition 1 open cursor for select * from outer_table, inner_table1 // inner table for condition 1 data where outer_table.columns meet condition 1 // apply condition 1 and outer_table.columns equals inner_table1.colums // join data // condition 2 open cursor for select * from outer_table, inner_table2 // inner table for condition 1 data where outer_table.columns meet condition 2 // apply condition 2 and outer_table.columns equals inner_table2.colums // join data etc.
-
Lines AdvTable-multiple-gray on which the operation was performed.
I have advanced at table with multi lines check.
I need all values in col1 of selected lines in the advTableVo and insert it in a custom table joined with TestVO
Once the values of these lines are inserted in the TestVO, select box should grey out for these specific advanced table lines.
That's what I did.
In advTableVO for table adv, I added a transitional attribute to the string "SelectMultiRow".
MultiSelections created for my adv. table
"SelectMultiRow" VO attribute associates, with multipleSelection1.
Under multipleSelection1, added a flowLayout, under him, a button "submit", saying: "InsertSelectedRows."Caught the action in PFR : if( pageContext.getParameter("InsertSelectedRows") != null); { am.invokeMethod("InsertSelectedRowsInQuestion"); } In AM : //added col1 values of all selected rows to ArrayList listOfQuestionsToBeInserted.add(poRow.getAttribute("Question"));
for (int j=0; j<listOfQuestionsToBeInserted.size(); j++)
{
System.out.println(" looking inside ArrayList " + listOfQuestionsToBeInserted.get(j)); ///this prints fine.
}
// Check If the value already exists in Question column in customdb (TestVO)
// insert only unique values in TestVO
// once committed, How to grey out select checkbox for rows in advtableVO, which have been inserted?
Hello
The selected lines you have captured on the right!
Now, instead of multiple selection... Take a separate box and bind a transitional (Boolean) Attribute to his property off using SPEL.
You save records after that it again once, loop through the selected vo lines and set the Transient true attribute.
To ensure that the checkbox is disabled for the selected lines.
Thank you
Gerard -
Which processors run faster?
Referring to a following linked picture, there are 2 CPU
i3 530, HT is disabled, so there are only 2 physical cores to calculations.
i5 2467 M, HT is enabled, so there are 4 logical cores for calculations.
CPU Mark for i5 is 2313, is this value determined according to 4 logical cores or logical 1 kernel?
As each instance of Excel can only utility one heart of the processor, what CPU will run faster calculation performance?
Does anyone have any suggestions?
Thanks in advance for your suggestions
http://I1093.Photobucket.com/albums/i438/junk000/CPU_zpsc43105d3.jpg
Maybe there ia a misspelling in your OP but please note that the i5-530 is a desktop CPU and i5-2467M is a mobile processor, you can't really compare these processors as the mobile processors are designed to be energy efficient and the dollar can pack the power of a desktop in a mobile processor processor!
The i3-530 is a processor of 'old generation' more aged, while the i5-2467 is a version more recent "2nd generation" processor. On a Windows XP computer, I would say that you are probably better off with the i3-530. The main advantages of the newest of the i5-2467M are that that it is a mobile processor it uses much, much less energy and that it supports AVX instructions. AVX instructions is relatively new and is compatible with recent operating systems (Windows 7, Windows 8 and Server 2008/2012). AVX instructions are not yet widely used, but these instruction sets will become more frequent and they will dramatically increase the performance of the CPU intensive applications, give it a few more years and you will see several business applications which use AVX instructions, tests suggest performance gains in the order of 30% with AVX instructions.
These can be useful:
http://cpuboss.com/CPUs/Intel-Core-i5-2467M-vs-Intel-Core-i3-530
http://www.CPU-world.com/compare/81/Intel_Core_i3_i3-530_vs_Intel_Core_i5_Mobile_i5-2467M.htmlhttp://Ark.Intel.com/products/56858?wapkw=i5-2467m
http://Ark.Intel.com/products/46472/Intel-Core-i3-530-processor-4m-cache-2_93-GHz?wapkw=i3+530John
PS. HT is not all it's cracked up to the to be, and most of the existing computers work better with HT turned off. Unless you have specific critical applications that have proved to work better with her, I would say that it be disabled in the BIOS.
-
Commit performance on table with Fast Refresh MV
Hello world
Try to wrap your head around fast refresh performance and why I see (what I consider) high disk numbers / query associated with the update of the MV_LOG in a TKPROF.
The installation program.
(Oracle 10.2.0.4.0)
Database table:
MV was createdSQL> desc action; Name Null? Type ----------------------------------------- -------- ---------------------------- PK_ACTION_ID NOT NULL NUMBER(10) CATEGORY VARCHAR2(20) INT_DESCRIPTION VARCHAR2(4000) EXT_DESCRIPTION VARCHAR2(4000) ACTION_TITLE NOT NULL VARCHAR2(400) CALL_DURATION VARCHAR2(6) DATE_OPENED NOT NULL DATE CONTRACT VARCHAR2(100) SOFTWARE_SUMMARY VARCHAR2(2000) MACHINE_NAME VARCHAR2(25) BILLING_STATUS VARCHAR2(15) ACTION_NUMBER NUMBER(3) THIRD_PARTY_NAME VARCHAR2(25) MAILED_TO VARCHAR2(400) FK_CONTACT_ID NUMBER(10) FK_EMPLOYEE_ID NOT NULL NUMBER(10) FK_ISSUE_ID NOT NULL NUMBER(10) STATUS VARCHAR2(80) PRIORITY NUMBER(1) EMAILED_CUSTOMER TIMESTAMP(6) WITH LOCAL TIME ZONE SQL> select count(*) from action; COUNT(*) ---------- 1388780
Fast refresh works fine. And the newspaper is kept small enough.create materialized view log on action with sequence, rowid (pk_action_id, fk_issue_id, date_opened) including new values; -- Create materialized view create materialized view issue_open_mv build immediate refresh fast on commit enable query rewrite as select fk_issue_id issue_id, count(*) cnt, min(date_opened) issue_open, max(date_opened) last_action_date, min(pk_action_id) first_action_id, max(pk_action_id) last_action_id, count(pk_action_id) num_actions from action group by fk_issue_id; exec dbms_stats.gather_table_stats('tg','issue_open_mv') SQL> select table_name, last_analyzed from dba_tables where table_name = 'ISSUE_OPEN_MV'; TABLE_NAME LAST_ANAL ------------------------------ --------- ISSUE_OPEN_MV 15-NOV-10 *note: table was created a couple of days ago * SQL> exec dbms_mview.explain_mview('TG.ISSUE_OPEN_MV'); CAPABILITY_NAME P REL_TEXT MSGTXT ------------------------------ - -------- ------------------------------------------------------------ PCT N REFRESH_COMPLETE Y REFRESH_FAST Y REWRITE Y PCT_TABLE N ACTION relation is not a partitioned table REFRESH_FAST_AFTER_INSERT Y REFRESH_FAST_AFTER_ANY_DML Y REFRESH_FAST_PCT N PCT is not possible on any of the detail tables in the mater REWRITE_FULL_TEXT_MATCH Y REWRITE_PARTIAL_TEXT_MATCH Y REWRITE_GENERAL Y REWRITE_PCT N general rewrite is not possible or PCT is not possible on an PCT_TABLE_REWRITE N ACTION relation is not a partitioned table 13 rows selected.
When I update a row in the base table:SQL> select count(*) from mlog$_action; COUNT(*) ---------- 0
What follows, I get via tkprof.var in_action_id number; exec :in_action_id := 398385; UPDATE action SET emailed_customer = SYSTIMESTAMP WHERE pk_action_id = :in_action_id AND DECODE(emailed_customer, NULL, 0, 1) = 0 / commit;
Could someone explain why the the SELECT/UPDATE/DELETE on MLOG$ _ACTION if 'expensive' when it should be only 2 rows (the old value and the new value) in this newspaper after an update? I could do to improve the performance of the update?******************************************************************************** INSERT /*+ IDX(0) */ INTO "TG"."MLOG$_ACTION" (dmltype$$,old_new$$,snaptime$$, change_vector$$,sequence$$,m_row$$,"PK_ACTION_ID","DATE_OPENED", "FK_ISSUE_ID") VALUES (:d,:o,to_date('4000-01-01:00:00:00','YYYY-MM-DD:HH24:MI:SS'),:c, sys.cdc_rsid_seq$.nextval,:m,:1,:2,:3) call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 1 0.00 0.01 0 0 0 0 Execute 2 0.00 0.03 4 4 4 2 Fetch 0 0.00 0.00 0 0 0 0 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 3 0.00 0.04 4 4 4 2 Misses in library cache during parse: 1 Misses in library cache during execute: 1 Optimizer mode: CHOOSE Parsing user id: SYS (recursive depth: 1) Rows Row Source Operation ------- --------------------------------------------------- 2 SEQUENCE CDC_RSID_SEQ$ (cr=0 pr=0 pw=0 time=28 us) Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ db file sequential read 4 0.01 0.01 ******************************************************************************** ******************************************************************************** update "TG"."MLOG$_ACTION" set snaptime$$ = :1 where snaptime$$ > to_date('2100-01-01:00:00:00','YYYY-MM-DD:HH24:MI:SS') call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 1 0.00 0.01 0 0 0 0 Execute 1 0.94 5.36 55996 56012 1 2 Fetch 0 0.00 0.00 0 0 0 0 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 2 0.94 5.38 55996 56012 1 2 Misses in library cache during parse: 1 Misses in library cache during execute: 1 Optimizer mode: CHOOSE Parsing user id: SYS (recursive depth: 1) Rows Row Source Operation ------- --------------------------------------------------- 0 UPDATE MLOG$_ACTION (cr=56012 pr=55996 pw=0 time=5364554 us) 2 TABLE ACCESS FULL MLOG$_ACTION (cr=56012 pr=55996 pw=0 time=46756 us) Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ db file scattered read 3529 0.02 4.91 ******************************************************************************** select dmltype$$, max(snaptime$$) from "TG"."MLOG$_ACTION" where snaptime$$ <= :1 group by dmltype$$ call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 1 0.00 0.00 0 0 0 0 Execute 1 0.00 0.00 0 0 0 0 Fetch 2 0.70 0.68 55996 56012 0 1 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 4 0.70 0.68 55996 56012 0 1 Misses in library cache during parse: 1 Misses in library cache during execute: 1 Optimizer mode: CHOOSE Parsing user id: SYS (recursive depth: 1) Rows Row Source Operation ------- --------------------------------------------------- 1 SORT GROUP BY (cr=56012 pr=55996 pw=0 time=685671 us) 2 TABLE ACCESS FULL MLOG$_ACTION (cr=56012 pr=55996 pw=0 time=1851 us) Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ db file scattered read 3529 0.00 0.38 ******************************************************************************** delete from "TG"."MLOG$_ACTION" where snaptime$$ <= :1 call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 1 0.00 0.00 0 0 0 0 Execute 1 0.71 0.70 55946 56012 3 2 Fetch 0 0.00 0.00 0 0 0 0 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 2 0.71 0.70 55946 56012 3 2 Misses in library cache during parse: 1 Misses in library cache during execute: 1 Optimizer mode: CHOOSE Parsing user id: SYS (recursive depth: 1) Rows Row Source Operation ------- --------------------------------------------------- 0 DELETE MLOG$_ACTION (cr=56012 pr=55946 pw=0 time=702813 us) 2 TABLE ACCESS FULL MLOG$_ACTION (cr=56012 pr=55946 pw=0 time=1814 us) Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ db file scattered read 3530 0.00 0.39 db file sequential read 33 0.00 0.00 ********************************************************************************
Let me know if you need more info... would be happy to provide.My guess would be that you were once a very large transaction that inserted a large number of rows in this table. So the table segment is big enough now and the high watermark is average at the end of this segment, causing a full scan table to analyze a large number of empty blocks and retrieve the two lines.
You can issue a truncation on this table of $ MLOG: which would free up the empty blocks and brings back the high-watermark in the first block.
-
* Original title: TO RUN FASTER, IN PERFORMANCE OPTIONS
in the properties of systems, performance parameters, run FASTER, the OPTIONS of PERFORMANCE IN == ADVANCE = run FASTER, * it TOLD me TO DISABLE SOME SETTINGS, could you TELL ME WHAT SETTINGS I CAN UNCHECK.
When and where your computer is slow? Is the time required to start-up or after the reboot is complete? Browse the internet or work on files offline?
Select Start, run, type msconfigand press the ENTER key or click on the Startup tab. You will see a window like the image below. What elements are there?
In Windows 7, use Ctrl + Shift + Esc instead of Ctrl + Alt + Delete. It lets you in the Manager of tasks more quickly. Select Task Manager, performance, resource monitor tab and tab memory. What are the numbers for reserved equipment, in use, modification, sleep and free?
Is your Windows 7 32-bit or 64-bit? The amount of RAM is installed?
THE IMPACT OF THE COMPUTER ON THE PERFORMANCE SPECIFICATION
http://www.gerryscomputertips.co.UK/performance1.htm -
Performance of row_number, rank and dense_rank
Hello
Nature of my data is such that using row_number, rank and dense_rank give the same results. Which is faster?
Hello
Tested with my own set of data and performance are as follows.
DENSE_RANK (faster) > rank > row_number (slower)
Maybe you are looking for
-
Dual calendars on a computer?
I have a desire to have two different calendars on a single computer. In fact want to have two different calendars on four different computers. This may not make much sense but right now I need a calendar on a single computer and a different calend
-
Satellite A200 (PSAE6): Installig Realtek HD driver failure
Hello I tried to install Win XP SP2 on my laptop Satellite A200 (PSAE6)I found all the functional drivers sound card driver. I try pilots official homepage of Toshiba for XP, RealTek drivers, Intel - I installed Microsoft HotFixies for the audio HD s
-
Satellite U400-124: is it possible to restore the operating system without the DVD
I have a U400-124 I want to do a system restore.I created the Toshiba Recovery DVD but I don't have it with me (I'm in Italy and it is in the United Kingdom). I have three left: 1 Vista (c :))2 WinRE (d :))3 data (e :)) Is it possible to restore the
-
A100 - NIC not found Intel by the network boot floppies
I intend to clone my old computer hard drive to the new computer Satellite A100.But efforts to start from a floppy disk (e.g. Norton Ghost or Simons PTbackup tools) has failed. The reason is that Pro 100 adapter Intel is not recognized. It's a PCI NI
-
I get a blue screen STOP after the replacement of SSD drives. I had taken a picture SpotMau the week before so, fortunately, (I think) I will not lose a lot of work. Now, after the restoration of the image on a new SSD, I get a blue screen with: STOP