XSLT-like conditional indexes
Is there a plan to introduce conditional indexes the way it's done in XSLT?
Something like this:
<xsl:key name="action" match="/*/ENTRY[(@Operation='notify' or @operation='notify')]/DATA" use="@action"/>
From the top of my head:
1. Index by attribute value when another attribute of the same element has particular value[s], or evaluation of another attribute has particular value[s]. Combining of two indexes is not the same at all.
2. Index by element or attribute when path is important and there are other elements/attributes with the same name or exactly the same element, but located differently in tree.
I didn't look into documentation too deep, but it seems I never saw Berkeley DB XML supports full text search index. Does it?
Similar Messages
-
Hi in my sql query i applied like condition (like '%TEST') but it is taking long time. I applied indexes also,but still i'm facing the same problem. In my databse nearly 2,00,000 records their.
Hi Manikandan
Is there a difference in performance between running the query in BEx and WebI?
have you aggregates in place on the BEx side of things?
When you say its taking too long to open the report, have you a variable screen coming up for the report and is that what is taking the time or is it the report execution.
With regards
Gill -
Creating a conditional index? How to suggest a new feature?
How can I suggest a new feature in Oracle?
Imagine a table of service requests to be processed, where a column named STATUS can be: 'N': New, 'C': Canceled or 'P': Processed. This will result in a biased distribution where 'P' will represent more than 99% of rows.
I know that Oracle accept indexes created using functions and I can create an index on decode(STATUS,'P',null,STATUS) to make index small. But it will not help a query on STATUS = 'N' condition.
I would like to create a conditional index like:
create index idx01 on service_requests (status) where status <> 'P';
In this example, only status 'N' and 'C' will be indexed resulting in a very small index that can resolve filters like STATUS = 'N'.
Or this:
create index idx01 on some_tables (column1 including null values); to resolve COLUMN1 is NULL
Is there a way to suggest new features like this?How can I suggest a new feature in Oracle?
Imagine a table of service requests to be processed, where a column named STATUS can be: 'N': New, 'C': Canceled or 'P': Processed. This will result in a biased distribution where 'P' will represent more than 99% of rows.
I know that Oracle accept indexes created using functions and I can create an index on decode(STATUS,'P',null,STATUS) to make index small. But it will not help a query on STATUS = 'N' condition.
I would like to create a conditional index like:
create index idx01 on service_requests (status) where status <> 'P';
In this example, only status 'N' and 'C' will be indexed resulting in a very small index that can resolve filters like STATUS = 'N'.
Or this:
create index idx01 on some_tables (column1 including null values); to resolve COLUMN1 is NULL
Is there a way to suggest new features like this?
A new feature isn't needed. Oracle provides the equivalent of that 'conditional index' by allowing you to create, and index, VIRTUAL columns.
This code uses a VIRTUAL column and then creates an index on it.
drop table test_status
create table test_status (col1 number,
status varchar2(1),
special_status generated always as (decode(STATUS,'P',null,STATUS)
create index idx01 on test_status (special_status) -
Wat is the use of "DATA var-name LIKE SY-INDEX" statement
Hi to all,
is there any use of "DATA <var-name> LIKE SY-INDEX" statement in ABAP, do the variable <var-name> be changed with that of SY-INDEX when we declare like this.
Could u give me a fast response,
Thank you,
Srinivasa Rao k.hi check this example..
data: v_index type sy-index value 10 .
do 15 times .
if sy-index = v_index .
write:/ 'the system index is 10 '.
exit.
endif.
enddo.
the main use of the index is used in the hr programs..
the user wants the emp salary and previous months salary then you need to use the index .
if the table had 10 records .then you need to catch the record of index1(current) and index 2(for previous month)..
select pernr ansal from pa0008 into table it_pa0008 where pernr in s_pernr and begda in s_begda .
loop at it_pa0008.
case sytabix.
when 1 .
it_final-cursal = it_pa0008-ansal.
when 2 .
it_final-prevsal = it_pa0008-ansal.
endcase .
endloop.
regards,
venkat. -
Hi All,
With regards to condition index I have made the required tick in the condition type now when I am going into the master data with regards to creating condition records selecting the condition index tab by giving the input as the condition type, the system says that there are no records found, eventhough I have created the sales order in the system, the access sequence consists of line item and sales order please advise if any other configuration needs to be done for condition index and how do I check if the configuration is complete.
Kind Regards
AtulHi Condition indes only Specifies whether the system updates one or more condition indices when maintaining condition records. It depends whether you had created the combination of condition recored to determin if you can find the existing one, please be sure you had created the condition record via vk11.
-
I created a condition table with one field "KUNRE - Bill-to party" to use as a condition index.
When I tried to access the table via path
IMG > SD > Basic functions > Pricing > Maintain condition index > Maintain condition tables for index
I am getting an error "Table F 904 not Available - Message # VK016"
Can you help in creating a condition index with example.
Thanks,Hi Rama,
This may help:
http://help.sap.com/saphelp_40b/helpdata/en/93/743387546011d1a7020000e829fd11/content.htm
Cheers -
Like condition in the where clause.
Dear All,
I have created a new form using a datablock wizard with one table.
Now i placed a text box and a button in the same form. I will be entering the value in the text box and based up the condition in the where clause of the datablock property i am restricting the values where the column name is thetext box value.
Now my problem is i need to give a string value in the text box and the datablokc has to populate based up the like condtion. I dont know the syntax how to give like condition in the where clause of the property pallet.
Please help me in this.
Thanks in advance.
Cheers,
RajuMaybe try this ...
Create a button to query the block :
In the WHEN-BUTTON-PRESSED-Trigger enter :
DECLARE
v_block_def_where VARCHAR2(255) := '1 = 1';
BEGIN
v_block_def_where := v_block_def_where || ' AND NAME_OF_YOUR_TABLE_COLUMN LIKE ''' || '%' || :NAME_OF_YOUR_BLOCK.SEARCH_ITEM || '%' || '''';
SET_BLOCK_PROPERTY('NAME_OF_YOUR_BLOCK', DEFAULT_WHERE, v_block_def_where);
GO_BLOCK('NAME_OF_YOUR_BLOCK');
EXECUTE_QUERY;
END; -
Multi-choice parameters with "like" condition
Hi,
I defined a parameter, multi-choice, using a "like" condition. It always works for the first value of the LOV and ignores the rest of the values chosen.
Is there any way that the "like" condition can be used for more than one parameter value?
In other words, if someone chooses values A,B,C from the LOV, I would like the condition to be interpreted as:
Field like 'A' or Field like 'B' or Field like 'C'.
--Further explanation--->
The reason that I need to use LIKE is that the field contains, e.g. A-1, A-2, A-3, B-1,B-2...
Instead of having the LOV list the variations, it would be much easier for the user to choose A and then get all the A's that exist.
Thanks.
LeahWhat I am still understanding is defining the calculated field as a predefined length which I don't think will work since some of the values are shorter and some longer.
However, you gave me another idea (unless this is what you really meant). I can define the calculated field similar to how I defined the list of values, i.e. take the value of the field until the '-' sign (if it exists). If the actual field value is "permit medical-2", then in the LOV it only says "permit medical". If the original field is "surgery" then the LOV is "surgery. I can do the same thing in the calculated field. Then the condition would be calculated field = LOV.
Thank you! Now my only problem is that I will not be at work for 10 days so I will have to wait until then to try it.
I will let you know how it worked out.
Thanks.
Leah -
Multiple values for a Like condition
How can I make a like condition for multiple value options,
for example
select b.segment1, b.segment2, b.description, c.cross_reference, c.cross_reference_type
from inv.mtl_system_items_b b, inv.mtl_cross_references_b c
where b.inventory_item_id = c.inventory_item_id and
b.ORGANIZATION_ID = 136 and
c.cross_reference like (
'1267801228%',
'1267801230%',
'1500005030%',
'1745%',
'1874106005%',
'2004%',
'2004%',
'232003000000%',
'303681020128%',
'3426441351%',
'489122853014%',
'4894230110%',
'5383800117%',
'5422810701%',
'5422810711%',
'5422810711%',
'70986205105%',
'70986205112%',
'70986205122%',
'70986205131%',
'70986205131%',
'70986205131%',
'70986205142%')Edited by: user8986013 on 28-oct-2010 8:19One way could be to sort the String for length and then use SUBSTR with an IN-List:
select b.segment1, b.segment2, b.description, c.cross_reference, c.cross_reference_type
from inv.mtl_system_items_b b, inv.mtl_cross_references_b c
where b.inventory_item_id = c.inventory_item_id and
b.ORGANIZATION_ID = 136 and
(substr(c.cross_reference,1,12) in (
'232003000000',
'303681020128',
'489122853014')
or
substr(c.cross_reference,1,11) in (
'70986205105',
'70986205112',
'70986205122',
'70986205131',
'70986205142')
or
substr(c.cross_reference,1,10) in (
'4894230110',
'5383800117',
'5422810701',
'5422810711',
'3426441351',
'1267801228',
'1267801230',
'1500005030',
'1874106005')
or
substr(c.cross_reference,1,4) in (
'1745',
'2004')
);By the way: I removed some duplicates.
Edited by: hm on 28.10.2010 09:29 -
Why do I use condition indexes? How do you activate them?
Hi all
Why do I use condition indexes? How do you activate them?
thanks allYou can create and use condition indices. You can use these indices to display, change and create condition records with reference. This transaction can include condition records with several condition types and tables. For example, you can use a condition index if you want to see all condition records that apply to a particular product regardless of whether the records are prices or discounts. In this case, you can use one of the standard condition indexes. Or you may want to see a list of condition records that contain a particular sales deal and a material from a user-specified list of products. To display this information, you can create your own condition index.
Creating a condition index is similar to creating a condition table. In Customizing for Sales, you select the combination of fields that you want in the index key. The system automatically proposes a list of permitted fields to choose from. The fields you specify for the key can have a maximum combined length of 100 characters.
The activation function displays a list of all available condition indexes and indicates which are active. The system can use a condition index only when it is activated. Before you can use the indexes that are delivered in the standard version, you must first activate them in Customizing for Sales. Some indices are activated automatically during generation. In addition, you must specify one of the following index updating requirements for each condition index:
Requirement 1: The index is updated when the user provides data for all fields in the index
Requirement 2: The index is updated when the user provides data for at least the first index field -
What is the mean of condition index in pricing condition
hi
my question is what is the mean of conditon index in pricing condition type what is the use of it give me ascenario.hi nag
A customer-defined list of conditions that allows quicker access to condition records or a group of condition records.
<a href="https://forums.sdn.sap.com/click.jspa?searchID=4774296&messageID=3962335">condition index</a>
Condition Index can be created for particular condition type to maintain condition record. The condition index along with the condition update field in condition type (T.Code: V/06) restricts the usage of condition type for limited sales orders, condition base value or condition value.
Features of condition Index:
When checked this specifies whether the system updates one or more condition indices when maintaining condition records.
This makes it possible to list or maintain condition records independently of condition type and condition table
Message was edited by:
Prashanth Goud -
Help for conditional indexing in LV 2012?
Not that I need it, but I could not find any help on the new LV 2012 Conditional Indexing feature. It appears in the contextual menu, but the contextual help does not provide any hint of what this is, and it's nowhere to be found in the Help:
Solved!
Go to Solution.Sorry it took so long to get back. I had to download LV2012. I think I still need to download the patch. And also setup all of my setting and addons. VIPM will be busy for the rest of the day.
Anyways, your benchmark is flawed. Add outputs to the arrays and you will get radically different results. I think some of your loops didn't exactly iterate the 10000 times since there was no output. And I have no clue what you were trying to show with the second benchmark.
I didn't edit the labels yet. So for those who haven't looked at the VI, "x/y" is the time for pre-allocating and keeping only what is needed. "x/y 2" is the same except with another data type. "x/y 3" is using the build array. "x/y 4" is using the new conditional indexing feature. Each one is looped 10000 times and the average is given (in ms).
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Conditional Indexing Benchmark Results.PNG 3 KB
benchmarking.vi 24 KB -
List of Like condition from one Lookup table.
Hi,
I have 2 tables.
SourceData table and LookUp table .
SourceData table has one column called SName
SName
Jayesh Krishnan
Karthik Kumar
Liju Sharma
Kumar Jayesh
Kumar Pradeep
Lookup table has one column called LName(Lookup table is the one which is required to look up with "like" condition)
LNamne
Kumar%
%Krishnan
I need to query SourceDate table with the like condition mentioned in lookup table.
So my result based on above two tables should look like
Jayesh Krishnan
Kumar Jayesh
Kumar Pradeep
Please help me in this regard.Try this,
create table sourcetable (SName varchar(200))
insert into sourcetable values('Jayesh Krishnan')
insert into sourcetable values('Karthik Kumar')
insert into sourcetable values('Liju Sharma')
insert into sourcetable values('Kumar Jayesh')
insert into sourcetable values('Kumar Pradeep')
create table lookuptable (LName varchar(200))
insert into lookuptable values('Kumar%')
insert into lookuptable values('%Krishnan')
go
declare @sql nvarchar(max)
declare @temp table ([where] nvarchar(max))
declare @where nvarchar(max)
set @sql = 'SELECT Substring(COLS,4, LEN(COLS)) FROM (
SELECT Stuff((SELECT '' OR SName like '''''' + LName + ''''''''
FROM lookuptable
FOR xml path('''')), 1, 1, '''') COLS
) X'
insert into @temp exec sp_executesql @sql
select @where = [where] from @temp
set @sql = 'SELECT * FROM sourcetable WHERE ' + @where
exec sp_executesql @sql
go
drop table sourcetable
drop table lookuptable
Regards, RSingh -
Add dummy Like condition '%%' inorder to use index scan
Hi,
I have a table like below , which have data which capture each minute(columnB) transactions
CREATE TABLE tableA
columnA CHAR(6),
columnB Date,
columnC Number(3,0),
CRT_ID CHAR(8),
CRT_TS TIMESTAMP(6),
UPD_ID CHAR(8),
UPD_TS TIMESTAMP(6),
CONSTRAINT PK_tableA_colAB PRIMARY KEY (columnA , columnB )
When I query the table, to get the list of transaction between particular date, it goes for TABLE FULL SCAN.( cost and execution time also high)
Total no of records in the table(tableA) is 13669094, the below query returns only around 150 to 200 no of records
select columnA,columnB,columnC,Crt_Id,Crt_ts
from tableA
where columnB between TO_DATE('06/28/2013','MM/DD/yyyy') and to_date('06/29/2013','MM/DD/yyyy')
when i use the query like below it will use the INDEX SCAN (cost and execution time also less)
select columnA,columnB,columnC,Crt_Id,Crt_ts
from tableA
where columnB between TO_DATE('06/28/2013','MM/DD/yyyy') and to_date('06/29/2013','MM/DD/yyyy')
and columnA like '%%'
Please advice is it good to add condition like '%%' inorder to use the index scan. Also kindly let me know if it works in the same way in all environments.Hi RP0428,
Thank you very much for your response.
1. Are you collecting statistics on the table and indexes?
2. Post the exact command you use to collect those statistics.
Recently my DBA had gathered the statistics on 17-Dec-2013 22:01:32(LAST_ANALYSED). I am unaware about what query he ran to gather the statistics.
After that it executed in 28 seconds itself, before it took several minutes.
My concerns is only gathering the statistics periodically will improve performance.
Table is growing with thousands of records daily. Already it have 13669094 records. In order to avoid Full Table Scan
From my knowledge, I feel creating composite Range-Hash partitioning will helpful in improving the performance.
3. Post info about the data distribution for the two columns used by the index. This is 'counts and amounts' for each of the two columns and a GROUP BY date showing the skew of the values.
Plz find the details below
ColumnA
ColumnB
AA1
118800
AA2
117600
AA3
118200
AA4
118200
AA5
118200
AA6
118800
AA7
118800
AA8
117600
AA9
117600
AA10
117600
AA11
118200
AA12
118200
AA13
37234
AA14
118200
AA118
18450
AA119
96600
AA120
105000
AA121
105000
AA122
105600 -
SQL Performance tuning with wildcard Like condition
Hi,
I have performance issue with SQL query.
When I am using "where emp_name like '%im%' " query is taking longer time than when I use "where emp_name like 'im%' " .
With former condition query takes 40 sec , with later it takes around 1.5 sec.
Both returns almost same no. of rows. We have function based index created on emp_name column.
With wildcard at both ends query goes for full table scan.
Can any one please suggest way so that query responce time can be reduced.?
I even tried using hints but still it is going for full table scan instead of using index.>
Hi Mandark,
<I've rearranged your post>
When I am using "where emp_name like '%im%' " query is taking longer time than when I use "where emp_name like 'im%' " .
With wildcard at both ends query goes for full table scan.
I even tried using hints but still it is going for full table scan instead of using index.
With former condition query takes 40 sec , with later it takes around 1.5 sec.
Both returns almost same no. of rows. We have function based index created on emp_name column.You are never going to be able to speed things up with a double wild card - or even 1 wild card at the beginning
(unless you have some weird index reversing the string).
With the double wild-card, the system has to search through the string character by character to see
if there are any letter "i's" and then see if that letter is followed by an "m".
That's using your standard B-tree index (see below).
Can any one please suggest way so that query responce time can be reduced.?Yes, I think so - there is full-text indexing - see here:
http://www.dba-oracle.com/oracle_tips_like_sql_index.htm and
http://www.oracle-base.com/articles/9i/full-text-indexing-using-oracle-text-9i.php
AFAIK, it's an extra-cost option - but you can have fun finding out all that for yourself ;)
HTH,
Paul...
Maybe you are looking for
-
HP Color LaserJet CP1518ni - Network connect on Windows 7 64-bit operating system.
For a temporary fix, I've connect an HP Color LaserJet CP1518ni for network use by my department. The printer is printer over the network, but it is not printing in color - just black and white/grayscale. The demo page prints in color, but nothing
-
Contact names not showing on texts - N95
I have a Nokia n95, on 02. I got it in June of last year, so it's no longer under warranty. On Friday just gone, for some unknown reason, when i receive a text, it comes up with the number of the person that sent it, starting with +44, despite the fa
-
Access Database in sharepoint 2013
We have a new server here at work. One of the virtual servers on this server has an installation of sharepoint 2013. I have installed and configured many previous installations of sharepoint, 2013 is quite the different animal and I am working thro
-
I cant install itunes, i cant install itunes
I keep trying to install the new itunes on mac os x snow leopard and I keep getting an install error. no error codes are present. I have repaired permissions, repaired disk, and removed all traces of previous itunes. What else can I try?? Please help
-
Is anyone else having table border rendering problems in Firefox 3.6.7 for Mac?
I recently applied a Mac Firefox update (not sure which one, but I'm currently on 3.6.7) that introduced some strange table border rendering behaviors. Long story short, on certain pages that I visit regularly, the right-most table borders are now re