Global post code/city/state/province/country selection
Is there a best-practise approach for a global application
needing to
let users input their addresses?
Are there any free MySQL DB's that have this info available?
I'm thinking of maybe three ways to go about this and maybe
there are
more but I just don't know what's going to result in the most
accurate
data and easiest mechanism for users to input their address
info.
1: AJAX calls populating relevant selects onChange
2: Non-JS clients doing a round trip to the server and back
instead
(possibly multiple times if need be)
3: If there is no way to get a free DB set up for both steps
1 and 2 to
reference, is there a free webservice instead (although this
could be
slow/unreliable unless someone knows of an outstanding
service they
could recommend).
Perhaps there are better ways?
Hopefully many developers have come across this before and
settled on
the best way to achieve this and are willing to share their
experiences
and advice.
Thanks.
Oh, and further to that, what's the best free way to gleam
the users
location from their IP addy? GeoLocator.cfc? Other? I'm
thinking that
would be a good starting point when the user first encounters
the
address form; have it automagically select guestimate
country/state/city.
Lossed wrote:
> Is there a best-practise approach for a global
application needing to
> let users input their addresses?
>
> Are there any free MySQL DB's that have this info
available?
> I'm thinking of maybe three ways to go about this and
maybe there are
> more but I just don't know what's going to result in the
most accurate
> data and easiest mechanism for users to input their
address info.
>
> 1: AJAX calls populating relevant selects onChange
> 2: Non-JS clients doing a round trip to the server and
back instead
> (possibly multiple times if need be)
> 3: If there is no way to get a free DB set up for both
steps 1 and 2 to
> reference, is there a free webservice instead (although
this could be
> slow/unreliable unless someone knows of an outstanding
service they
> could recommend).
>
> Perhaps there are better ways?
>
> Hopefully many developers have come across this before
and settled on
> the best way to achieve this and are willing to share
their experiences
> and advice.
>
> Thanks.
Similar Messages
-
Using AJAX to load city, state, metro area based on zip code
I'm new to getting APEX to work with AJAX properly. I've been reading some tutorials and trying to apply what they do to my situation, but I'm running into a problem. I have a text field item for zip code. What I want to happen is that when someone enters in a zip code, I want to use AJAX to populate 3 different select lists (1 each for state, city, and metro area) and to populate a checkbox (of neighborhoods based on the zip code as well). I'm looking at the examples in:
http://www.oraclealchemist.com/wp-content/uploads/2006/11/s281946.pdf
and
http://apex.oracle.com/pls/otn/f?p=11933:63
But they all use examples where the value of a text field item is used to populate 1 select list. I can't figure out how to apply that methodology to populate 3 select lists and 1 checkbox item. I've got all my SELECT statements written to populate these fields based on the value of the zip code text field item, but don't know how to convert what I already have to use AJAX.
Here are my SELECT statements:
P2805_STATE lov:
===========================================================================================
SELECT INITCAP(GEO_DATA_STATE.STATEFULLNAME) d,GEO_DATA_STATE.STATE v
FROM GEO_DATA_STATE, GEO_DATA_ZIP
WHERE isPrimary = 'P' and
trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
ORDER BY STATEFULLNAME
P2805_CITY lov:
===========================================================================================
SELECT UNIQUE (INITCAP(GEO_DATA_CITY.CITY)) d,GEO_DATA_CITY.CITY v
FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_CITY
WHERE
trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
trim(upper(GEO_DATA_ZIP.CITY)) = trim(upper(GEO_DATA_CITY.CITY)) and
GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
ORDER BY GEO_DATA_CITY.CITY
P2805_METRO_AREA lov:
===========================================================================================
SELECT UNIQUE (INITCAP(GEO_DATA_METRO.METRO_AREA)) d,GEO_DATA_METRO.CODE v
FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_METRO
WHERE
trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
trim(upper(GEO_DATA_ZIP.METROCODE)) = trim(upper(GEO_DATA_METRO.CODE)) and
GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
ORDER BY 1
P2805_NEIGHBORHOOD lov:
===========================================================================================
SELECT UNIQUE (INITCAP(GEO_DATA_HOOD.HOOD)) d,GEO_DATA_HOOD.HOOD v
FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_METRO, GEO_DATA_HOOD
WHERE
trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
trim(upper(GEO_DATA_ZIP.METROCODE)) = trim(upper(GEO_DATA_METRO.CODE)) and
GEO_DATA_HOOD.METRO_CODE = GEO_DATA_METRO.CODE and
GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
ORDER BY 1Do all these statements need to go in 1 on-demand process? Where do I go from here?Andy, cool. This is starting to make more sense. THANKS A BUNCH! OK. I've gone ahead and modified the on demand process to suit my needs, so I have:
begin
owa_util.mime_header('text/xml', FALSE );
htp.p('Cache-Control: no-cache');
htp.p('Pragma: no-cache');
owa_util.http_header_close;
-- Building States list
htp.prn('<SELECT>');
FOR i in (
SELECT INITCAP(GEO_DATA_STATE.STATEFULLNAME) d, GEO_DATA_STATE.STATE v
FROM GEO_DATA_STATE, GEO_DATA_ZIP
WHERE isPrimary = 'P' and
trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
ORDER BY STATEFULLNAME
LOOP
htp.prn('<OPTION VALUE=''' || i.v || '''>' || i.d || '</OPTION>');
END LOOP;
htp.prn('</SELECT>');
-- Building Cities list
htp.prn('<SELECT>');
FOR i in (
SELECT UNIQUE (INITCAP(GEO_DATA_CITY.CITY)) d, GEO_DATA_CITY.CITY v
FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_CITY
WHERE
trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
trim(upper(GEO_DATA_ZIP.CITY)) = trim(upper(GEO_DATA_CITY.CITY)) and
GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
ORDER BY GEO_DATA_CITY.CITY
LOOP
htp.prn('<OPTION VALUE=''' || i.v || '''>' || i.d || '</OPTION>');
END LOOP;
htp.prn('</SELECT>');
-- Building Metro Area list
htp.prn('<SELECT>');
FOR i in (
SELECT UNIQUE (INITCAP(GEO_DATA_METRO.METRO_AREA)) d, GEO_DATA_METRO.CODE v
FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_METRO
WHERE
trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
trim(upper(GEO_DATA_ZIP.METROCODE)) = trim(upper(GEO_DATA_METRO.CODE)) and
GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
ORDER BY 1
LOOP
htp.prn('<OPTION VALUE=''' || i.v || '''>' || i.d || '</OPTION>');
END LOOP;
htp.prn('</SELECT>');
-- Building Neighborhood list
htp.prn('<SELECT>');
FOR i in (
SELECT UNIQUE (INITCAP(GEO_DATA_HOOD.HOOD)) d, GEO_DATA_HOOD.HOOD v
FROM GEO_DATA_STATE, GEO_DATA_ZIP, GEO_DATA_METRO, GEO_DATA_HOOD
WHERE
trim(upper(GEO_DATA_ZIP.STATE)) = trim(upper(GEO_DATA_STATE.STATE)) and
trim(upper(GEO_DATA_ZIP.METROCODE)) = trim(upper(GEO_DATA_METRO.CODE)) and
GEO_DATA_HOOD.METRO_CODE = GEO_DATA_METRO.CODE and
GEO_DATA_ZIP.ZIPCODE = :P2805_ZIPCODE
ORDER BY 1
LOOP
htp.prn('<OPTION VALUE=''' || i.v || '''>' || i.d || '</OPTION>');
END LOOP;
htp.prn('</SELECT>');
end;It doesn't look like I would have to modify the appendToSelect function at all, correct? Is the checkbox that I need to populate handled the same way as these select lists? And it seems like I only need to make the 2 changes that you mentioned to get_AJAX_SELECT_XML function, right? So my javascript function should be like:
<script language="JavaScript1.1" type="text/javascript">
function get_AJAX_SELECT_XML(pThis,pSelect1,pSelect2,pSelect3,pSelect4){
if (document.getElementById('P2805_ZIPCODE').value.length == 5)
var l_Return = null;
var l_Select1 = $x(pSelect1);
var l_Select2 = $x(pSelect2);
var l_Select3 = $x(pSelect3);
var l_Select4 = $x(pSelect4);
var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=otn_Select_XML',0);
get.add('TEMPORARY_ITEM',pThis.value);
gReturn = get.get('XML');
var sels = gReturn.getElementsByTagName("select");
if(gReturn && l_Select1){
var l_Count = sels[0].getElementsByTagName("option").length;
l_Select1.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = sels[0].getElementsByTagName("option");
appendToSelect(l_Select1, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
if(gReturn && l_Select2){
var l_Count = sels[1].getElementsByTagName("option").length;
l_Select2.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = sels[1].getElementsByTagName("option")[i];
appendToSelect(l_Select2, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
if(gReturn && l_Select3){
var l_Count = sels[2].getElementsByTagName("option").length;
l_Select3.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = sels[2].getElementsByTagName("option")[i];
appendToSelect(l_Select3, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
if(gReturn && l_Select4){
var l_Count = sels[3].getElementsByTagName("option").length;
l_Select4.length = 0;
for(var i=0;i<l_Count;i++){
var l_Opt_Xml = sels[3].getElementsByTagName("option")[i];
appendToSelect(l_Select4, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue)
get = null;
</script>
And then since all 4 items (3 select lists and 1 checkbox item) are populated based on the value inputted in the text field item, I would only need to add the following to the html form element attribute of my text field item, right?
onKeyUp="javascript:get_AJAX_SELECT_XML(this,'P2805_STATE','P2805_CITY','P2805_METRO_AREA','P2805_NEIGHBORHOOD');"Denes, thanks for the example. It seems like what I need to do is somewhere inbetween what you have and what's in the example on http://apex.oracle.com/pls/otn/f?p=11933:37. I have 3 select lists and 1 checkbox item that should all be populate depending on the value entered for the text item. Do I still need to split everything up then into a function and an on demand process for each select list and checkbox? -
Error in posting :First create the jurisdiction code at state level ()-URGE
Hi,
We are getting ERROR "First create the jurisdiction code at state level ()" at the time of postiong . This is HST calculated on benefit that we are trying to post;;
GL account tax category is defined as '<' in FS01 and posting without tax allowed is not checked. Are we missing aything;
Regards,
NeelimaHi Neelima,
Tax Jurisdiction code is related mainly to US.
Please check the if tax jurisdiction code is maintained in SPRO > Financial Accounting > Financial Accounting Global Settings 's basic settings part. If not, maintain the same for the state. This might help you.
Best Regards,
Venkat.
Edited by: Venkateswara Sarma Bhamidipati on Jan 1, 2011 4:45 AM -
Which table stores the valid City/State/Country combination for Customers
Hi,
I would like to know which table stores the valid city/state/country/county/provinces for Customer Address validation
Any helps please?
Thanks,
GenooHi,
Please ensure to include your EBS version, so as to better provide assistance..
Please have a look at the doc as its explained in-depth:
Projects Uptake of the TCA Architecture in Release 12 [ID 417511.1]
Hope this helps,
Best Regards, -
City, state & zip-code DB
Hi,
Is there a free city, state and zipcode database available for US ?
Basically what I want is that I have two drop downs, 1 for state, 2 for city.
If a state is selected, cities for that state get populated from this database.
In the same way, if a zip code is entered, both the cities and state get populated from this db.
Thanks for all the help !Not that I know of....
-
How do I add State/Province and Country to my drop down list?
How do I add State/Province and Country to my drop down list?
Hi Gen,
My problem is that I'm working with the free version of Form Central - I'm willing to purchase a version. Earlier in my form I have States as a drop down menu (see below) but can't copy it to make it appear later in the same document. I was trying to avoid recreating the entire form. Any tips on copying or duplicating a field inside a document.
Best Regards,
Gina Grant
ink + thread
312.970.1106 (p)
773.435.6474 (f)
www.inknthread.com
CPS Vendor #: 98626
The information contained in this email is confidential, proprietary and may be legally privileged. This email is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, or reproduction is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact ink + thread by e-mail ([email protected]) and destroy all copies of this email. -
Customer master Post code and city field Issue
Hi,
I am facing a problem with the customer master, In the address tab postal code N0N 1J2 is giving a default value in the city description tab, However the defaulted value is not the correct one.
Eg. if post code 123 has to display DELHI it displays BOMBAY.
Can you suggest where can i change the defaulted value. Is there a table entry missing that should allow this city / zip code combination? Where are these settings maintained.
RgdsHi Prabu,
Check this link it would be helpful to your solution
http://forums.sdn.sap.com/thread.jspa?threadID=1962002
Let me know if your problem is solved
Regards
Pradeep -
State code for Canadian Province Alberta
In the initial definition of SAP, the state code for canadian province Alberta is set to 'AL'. The proper code should be 'AB'
Hello,
Thank you for the input.
We will try to reflect this requirement in next version after v2007 which should enter ramp-up soon.
Regards,
Peter Dominik
B1 Solution Management -
I am trying to change my country from South Afrika to UK. I went into change ID, chose UK flag, changed everything to the new address. Logged into Apple Store, then got a message to verify account. Tells me invalid post code. Will not take anything else except my SA postcode. Then Apple store reverts back to Soth Africa and not UK
You need to ask Apple for assistance with getting back into your old ID. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to resolve this issue through the Account Security team, fill out and submit this form.
(118441) -
City, State Zip-code line...
Hi...
New here... Version 8.2.3 running in SAP.
Want to format a single address line from 4 individual fields... City, State Zip-code
Want the City, seperated from the State by a comma and 1 space.... and State seperated from the Zip-code by 1 space.
Examples...
Boston, MA 07884
Fountain Valley, CA 76877
How to do this in the form Layout?
In the Object Layout tab... I set the fields to "Expand to fit" in the width direction... but the City overlays the State...
I do not want... Boston, MA 07884 to accomodate longer City names.
For now... I format the single address line in the Interface ABAP code.
Thanks,
Dave T...Hi DaveT,
For starters you do not need to set the binding to None (Object > Binding palette). I had this in the example, because originally I didn't want the field to take part in the import XML.
When dealing with data, more often than not you really do want the objects set with a binding.
Using $record are you accessing the imported XML or a data connection? If so I would set up the data connection first and then bind the appropriate fields to that data connection.
The XFA Specification may help: http://partners.adobe.com/public/developer/xml/index_arch.html.
Hope that helps,
Niall -
ive recently purchased an i phone. i have an ipod with and account. while trying to access i tunes or apps for purchase, i am able to log in, but then it asks me to validate my info. so i do. same credit card, card number, sec code. billing address, everything that is used on my ipod. then i try to verify and it says....we couldn't verify your address. make sure you've entered the correct street, city state, and postal code. please help.
I'm suddenly having this same problem. I've had the other problem for a month or two where I had to reverify my payment info every day, and now when I do that I can't because it says the address that's been in there for 5 years is now unable to be verified. Anyone else? Any suggestions?
-
"Company code not assigned to country or country to calculation procedure"
Hi ,
I'm practicing SAP on IDES at home.
I have not created any 'Calculation procedure' (TAXINN or TAXINJ) neither assigned any procedure to
country 'IN'. I have maintained tax category 'MWST' for 'IN' in OVK1 and also assigned my delivering plant
for tax determination. I have also maintained tax relevancy for master records ( OVK3 - customer & OVK4 -
material ) and also maintained condition records for MWST.
Everything is working fine while creating normal sales order including accounting document creation &
posting. But when I'm creating a purchase order ( ME21N) for 3rd party process getting the error "Company
code not assigned to country or country to calculation procedure".
Plz help me with the solution how to create calculation procedure or which procedure should I assign to country 'IN' from the list of available procedure.
( I can't take help from FI guy as I'm practicing on my own )Hi Arveen,
Check calculation procedure using T.code OBYZ(IMG > Financial Accounting> Financial Accounting Global Settings--> Tax on Sales/Purchases --> Basic Settings -
> Assign Country to Calculation Procedure.)
Select new entries--Enter tax procedure for India TAXINN-TAx procedure INdia
Save.
Use T.code OBBG....select position...enter IN....against that assign the tax procedure created above and save.
Hope this resolves.Let me know if you still encounter problem.
Thanks
Aravind -
Deactive post code check in sales order
Hi all
We have one customer ,but this customer need us change ship-to-party address and postal code in sales order header().
but our system will check the country code and postal code.
How can I deactive post code check in sales order ???
thanksHi,
Postal code checking for country is a global setting in SAP, and many settings are depends upon it. But if you still want to change it you can modify it at country level.
Go to SPRO >> SAP Netweaver >> General Settings >> Set Countries >> Set-Country sepcific checks here select the country and modify it as you want.
but still i ll advice you to do not change these settings as it will affect as client level.
better you change Customer master address data as client wants and re enter re enter the customer code in sales order.
Regards, -
HOW TO: Post a SQL statement tuning request - template posting
This post is not a question, but similar to Rob van Wijk's "When your query takes too long ..." post should help to improve the quality of the requests for SQL statement tuning here on OTN.
On the OTN forum very often tuning requests about single SQL statements are posted, but the information provided is rather limited, and therefore it's not that simple to provide a meaningful advice. Instead of writing the same requests for additional information over and over again I thought I put together a post that describes how a "useful" post for such a request should look like and what information it should cover.
I've also prepared very detailed step-by-step instructions how to obtain that information on my blog, which can be used to easily gather the required information. It also covers again the details how to post the information properly here, in particular how to use the \ tag to preserve formatting and get a fixed font output:
http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
So again: This post here describes how a "useful" post should look like and what information it ideally covers. The blog post explains in detail how to obtain that information.
In the future, rather than requesting the same additional information and explaining how to obtain it, I'll simply refer to this HOW TO post and the corresponding blog post which describes in detail how to get that information.
*Very important:*
Use the \ tag to enclose any output that should have its formatting preserved as shown below.
So if you want to use fixed font formatting that preserves the spaces etc., do the following:
\ This preserves formatting
\And it will look like this:
This preserves formatting
. . .Your post should cover the following information:
1. The SQL and a short description of its purpose
2. The version of your database with 4-digits (e.g. 10.2.0.4)
3. Optimizer related parameters
4. The TIMING and AUTOTRACE output
5. The EXPLAIN PLAN output
6. The TKPROF output snippet that corresponds to your statement
7. If you're on 10g or later, the DBMS_XPLAN.DISPLAY_CURSOR output
The above mentioned blog post describes in detail how to obtain that information.
Your post should have a meaningful subject, e.g. "SQL statement tuning request", and the message body should look similar to the following:
*-- Start of template body --*
The following SQL statement has been identified to perform poorly. It currently takes up to 10 seconds to execute, but it's supposed to take a second at most.
This is the statement:
select
from
t_demo
where
type = 'VIEW'
order by
id;It should return data from a table in a specific order.
The version of the database is 11.1.0.7.
These are the parameters relevant to the optimizer:
SQL>
SQL> show parameter optimizer
NAME TYPE VALUE
optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 11.1.0.7
optimizer_index_caching integer 0
optimizer_index_cost_adj integer 100
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
optimizer_use_sql_plan_baselines boolean TRUE
SQL>
SQL> show parameter db_file_multi
NAME TYPE VALUE
db_file_multiblock_read_count integer 8
SQL>
SQL> show parameter db_block_size
NAME TYPE VALUE
db_block_size integer 8192
SQL>
SQL> show parameter cursor_sharing
NAME TYPE VALUE
cursor_sharing string EXACT
SQL>
SQL> column sname format a20
SQL> column pname format a20
SQL> column pval2 format a20
SQL>
SQL> select
2 sname
3 , pname
4 , pval1
5 , pval2
6 from
7 sys.aux_stats$;
SNAME PNAME PVAL1 PVAL2
SYSSTATS_INFO STATUS COMPLETED
SYSSTATS_INFO DSTART 01-30-2009 16:25
SYSSTATS_INFO DSTOP 01-30-2009 16:25
SYSSTATS_INFO FLAGS 0
SYSSTATS_MAIN CPUSPEEDNW 494,397
SYSSTATS_MAIN IOSEEKTIM 10
SYSSTATS_MAIN IOTFRSPEED 4096
SYSSTATS_MAIN SREADTIM
SYSSTATS_MAIN MREADTIM
SYSSTATS_MAIN CPUSPEED
SYSSTATS_MAIN MBRC
SYSSTATS_MAIN MAXTHR
SYSSTATS_MAIN SLAVETHR
13 rows selected.Here is the output of EXPLAIN PLAN:
SQL> explain plan for
2 -- put your statement here
3 select
4 *
5 from
6 t_demo
7 where
8 type = 'VIEW'
9 order by
10 id;
Explained.
Elapsed: 00:00:00.01
SQL>
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
Plan hash value: 1390505571
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 60 | 0 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| T_DEMO | 1 | 60 | 0 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | IDX_DEMO | 1 | | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("TYPE"='VIEW')
14 rows selected.Here is the output of SQL*Plus AUTOTRACE including the TIMING information:
SQL> rem Set the ARRAYSIZE according to your application
SQL> set autotrace traceonly arraysize 100
SQL> select
2 *
3 from
4 t_demo
5 where
6 type = 'VIEW'
7 order by
8 id;
149938 rows selected.
Elapsed: 00:00:02.21
Execution Plan
Plan hash value: 1390505571
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 60 | 0 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| T_DEMO | 1 | 60 | 0 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | IDX_DEMO | 1 | | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("TYPE"='VIEW')
Statistics
0 recursive calls
0 db block gets
149101 consistent gets
800 physical reads
196 redo size
1077830 bytes sent via SQL*Net to client
16905 bytes received via SQL*Net from client
1501 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
149938 rows processed
SQL>
SQL> disconnect
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsThe TKPROF output for this statement looks like the following:
TKPROF: Release 11.1.0.7.0 - Production on Mo Feb 23 10:23:08 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Trace file: orcl11_ora_3376_mytrace1.trc
Sort options: default
count = number of times OCI procedure was executed
cpu = cpu time in seconds executing
elapsed = elapsed time in seconds executing
disk = number of physical reads of buffers from disk
query = number of buffers gotten for consistent read
current = number of buffers gotten in current mode (usually for update)
rows = number of rows processed by the fetch or execute call
select
from
t_demo
where
type = 'VIEW'
order by
id
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 1501 0.53 1.36 800 149101 0 149938
total 1503 0.53 1.36 800 149101 0 149938
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 88
Rows Row Source Operation
149938 TABLE ACCESS BY INDEX ROWID T_DEMO (cr=149101 pr=800 pw=0 time=60042 us cost=0 size=60 card=1)
149938 INDEX RANGE SCAN IDX_DEMO (cr=1881 pr=1 pw=0 time=0 us cost=0 size=0 card=1)(object id 74895)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1501 0.00 0.00
db file sequential read 800 0.05 0.80
SQL*Net message from client 1501 0.00 0.69
********************************************************************************The DBMS_XPLAN.DISPLAY_CURSOR output:
SQL> -- put your statement here
SQL> -- use the GATHER_PLAN_STATISTICS hint
SQL> -- if you're not using STATISTICS_LEVEL = ALL
SQL> select /*+ gather_plan_statistics */
2 *
3 from
4 t_demo
5 where
6 type = 'VIEW'
7 order by
8 id;
149938 rows selected.
Elapsed: 00:00:02.21
SQL>
SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'));
PLAN_TABLE_OUTPUT
SQL_ID d4k5acu783vu8, child number 0
select /*+ gather_plan_statistics */ * from t_demo
where type = 'VIEW' order by id
Plan hash value: 1390505571
| Id | Operation | Name | Starts | E-Rows | A-Rows | A-Time | Buffers | Reads |
| 0 | SELECT STATEMENT | | 1 | | 149K|00:00:00.02 | 149K| 1183 |
| 1 | TABLE ACCESS BY INDEX ROWID| T_DEMO | 1 | 1 | 149K|00:00:00.02 | 149K| 1183 |
|* 2 | INDEX RANGE SCAN | IDX_DEMO | 1 | 1 | 149K|00:00:00.02 | 1880 | 383 |
Predicate Information (identified by operation id):
2 - access("TYPE"='VIEW')
20 rows selected.I'm looking forward for suggestions how to improve the performance of this statement.
*-- End of template body --*
I'm sure that if you follow these instructions and obtain the information described, post them using a proper formatting (don't forget about the \ tag) you'll receive meaningful advice very soon.
So, just to make sure you didn't miss this point:Use proper formatting!
If you think I missed something important in this sample post let me know so that I can improve it.
Regards,
Randolf
Oracle related stuff blog:
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/Alex Nuijten wrote:
...you missed the proper formatting of the Autotrace section ;-)Alex,
can't reproduce, does it still look unformatted? Or are you simply kidding? :-)
Randolf
PS: Just noticed that it actually sometimes doesn't show the proper formatting although the code tags are there. Changing to the \ tag helped in this case, but it seems to be odd.
Edited by: Randolf Geist on Feb 23, 2009 11:28 AM
Odd behaviour of forum software -
Error - Company code not assigned to country or country to calculation proc
Hi All,
We are on ECC 6.0 instance.
While trying to post a JE, I am getting the error message "Company code not assigned to country or country to calculation procedure". I am able to post the JE for a another company code. It seems we are missing some configuration for the company code error is coming up.
Any ideas what is causing the errors. More details about the error are below:
Company code not assigned to country or country to calculation procedure
Message no. FF703
Diagnosis
An error occurred when checking the tax code. Either the assignment of company code and country or of country and calculation procedure is not correct.
Procedure
Check the system settings.
To do this, choose Maintain entries (F5).
If the program error occurred
In a standard SAP program, then create an OSS message
In a program you wrote yourself, then correct the program.Hi,
You need to assign the tax procedure to company code.
Try transaction OBBG. and check whether the proper tax setting are maintained or not
You probably need to make other tax settings so you should check out
the menu Financial accounting>Financial Accounting Global Settings>Taxes on
Sales/Purchases in the IMG.
Hope it will work.
With Best Regards,
Navneet Chaubey
Maybe you are looking for
-
How to configure AD on windows 2012 server for Exchange 2013 internal and external email flow
Dear Experts, I have to configure exchange 2013 on Windows server 2012 STD. Company has registered Static IP addresses and can get the MX record pointing to any of this Static IP. The registered domain name is e.g. contoso.com. a. What should I u
-
Storing an array into the database using jdbc
Hi, i�ve got a problem storing an array into a database. I want to store objects consisting of several attributes. One of these attributes is an array containing several int values. I don�t know exactly what is the best way to store these objects int
-
I have guitar pro 6 on my mac and in my dock, but after installing lion it won't open. The icon bounces then starts to open and then closes. How can I get this app to open? Also when a disk is put in it goes in dosen't show the disk and then ejects i
-
I am have trouble updating my son's mid 2007 iMac past 10.5 installed from the retail Leopard disc after a series of crashes and hangs starting last week. at first i thought it was due to disk errors such as 'invalid node structure', but after runnin
-
Changing iPhone icons/9 page limit
Hello, I was wondering if currently there was any way to change the icons used on the iPhone like you can in OSX. Also, I've hit an app barrier at 9 pages and cannot load in anymore. Is there anyway to expand beyond this limit? There are so many cool