Home » Other » Test » Lord of the stickies - (c) Littlefoot
Lord of the stickies - (c) Littlefoot [message #261720] |
Thu, 23 August 2007 07:35 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Table of contents
IntroductionIntroduction
Welcome to OraFAQ Forum! Please, read this document before you start to actively participate. Here are guidelines of how to behave on the Forum in order to make it a cozy place to stay.
Some of the most important instructions are:
- Be polite
- Use English language in the main forum
- Provide all relevant information about your problem, including Oracle software version (4 decimal places) and operating system version
- Format your code and make sure that lines do not exceed 80 characters
How to format your post?How to format your post?
If you are providing code snippets such as SQL*Plus copy/paste, please be sure to use formatting tags: [code] Enter your code here.[/code] It makes a huge difference to the forum readers. Unreadable code makes a question harder to understand and will delay answers. A lot of people don't spend that much time on the forum and unclear posts will be skipped more often because they take a lot more time to decipher.
The difference between the code blocks below is clear:
First a block without proper tags, you'll notice that it is not that readable:
DECLARE
CURSOR yourcursor
IS
SELECT yourcolumn
, another_column
FROM yourtable
WHERE some_column BETWEEN A AND B
AND some_other > SYSDATE;
BEGIN
FOR a_record IN yourcursor
LOOP
do_something_here;
IF a_record.another_column = 1
THEN
do_extra_stuff;
ELSE
do_other_stuff;
ELSE;
END LOOP;
END;
Now, the same PL/SQL block – this time with use of the code tags. It clearly delineates the code from the other text and preserves text indenting.
DECLARE
CURSOR yourcursor
IS
SELECT yourcolumn
, another_column
FROM yourtable
WHERE some_column BETWEEN A AND B
AND some_other > SYSDATE;
BEGIN
FOR a_record IN yourcursor
LOOP
do_something_here;
IF a_record.another_column = 1
THEN
do_extra_stuff;
ELSE
do_other_stuff;
ELSE;
END LOOP;
END;
You can also paste the code in your message, select it and hit this button .
What if the code is not formatted itself? Code tags will do little about that. So you first have to format the code
- by hand
- via an external tool (like TOAD)
- via the SQL Formatter page of OraFAQ.
Make sure that lines of code do not exceed 80 characters.
Scott Mackey has created a nice little document explaining in detail and with screencaps how to format. The document can be downloaded/viewed here.
How to get a quick answer to your question?How to get a quick answer to your question?
Quote (a Chinese proverb) : | "He who asks a question may appear to be a fool, he who does not ask will remain a fool forever"
|
Before you decide to open a new topic, you should ask yourself:
- First of all: did I try myself? Or am I just hoping that someone else is willing to do my work?
- Did I read the documentation? A lot of questions are answered there. Really.
- Have I checked the FAQ page?
- Did I search the board properly? Have I also tried the Site Search Engine?
A large group of questions posted here are just a déjà -répondu of the past.
- Did I use Google? Even if your question hasn't been answered here, chances are that on other websites someone already has posted an answer.
- Is my question specific to the Oracle database? Now, that may seem obvious since this site is called Oracle FAQs, but we get quite a few questions about Access and MS SQL Server here - and SQL between databases is not always compatible - so please ask any non-Oracle questions elsewhere. It will be to your advantage.
Ok, so you didn't find an answer yet. No sweat, you're welcome to post it here and a lot of people are happy to answer. They can, however, answer only if enough info is provided.
Useful sitesUseful sites
(bookmark them!)
The 2 sites above require a free (no spam!) otn account. Subscribe now, it's well worth it.
- MetaLink: Oracle's official support website. Only accessible for users with a valid support identifier. But the place to be for patches, bugs, ORA-600 info, ...
- AskTom: a tremendous amount of SQL and PL/SQL related questions gathered on an easy website and answered by the master himself.
Posting guidelinesPosting guidelines
Theory
- Have the courtesy to write in plain English; it is not the first language of most of the participants to this forum, but that is no excuse for poor or nonexistent punctuation.
- If everyone used standard punctuation, like spaces between words and sentences, capitals for the first word of a sentence, a full-stop (period) to mark the end of a statement or a question mark to terminate a question then your requests will be more easily understood and your questions answered more clearly and quickly. Got it? Try it, it isn't that hard.
- Also, stop putting every phrase in a new paragraph, it makes entries deep and hard to read.
- People don't feel encouraged when they have to decipher some gobbledygook.
Abbreviations like "U", "Ur", "U r", "Plz", "prb", "qry" especially tend to get on people's nerves.
IM speak
Instant Messager language, like the (non-exhaustive) list below
- u = you
- ur = you are
- any1 = anyone
- gr8 = great
- pls/plz = please (especially avoid this in topic titles)
- urgnt = urgent (especially avoid this in topic titles)
- wrt = write
- i = I
- im = I am
is not appreciated:- It is hard to read.
- It is unprofessional.
- It doesn't show much respect towards your fellow forum members.
If you don't take time to write in proper English, how can you expect that others would answer properly?
- Always spell check and proof read your messages before posting them.
- As a rule of thumb: be polite. No one is paid for answering your question. The least you can do is show some respect to those who are willing to dedicate some of their spare time to look at your problem.
- If you feel that a message is not admissible for some reason (offending language/opinions, personal attacks, ...), you can report it to the moderator staff. But if you want extra attention for your topic, reporting will act counter-productive.
- Don't use uppercase only. It's harder to read and gives the impression you're shouting.
- Choose a topic title that makes sense. A good title might be "ORA-1555 during pl/sql loop"
A less fortunate choice might be "URGNT PLZ!!!!!!!!!!!!"
Avoid the following keywords: urgent/please/help/now/immediately (and derivatives)
- Choose the appropriate forum. If in doubt, don't worry - moderators can always move it
- Don't cross-post. Duplicates will be removed.
- Commercial posts are admitted only in the Marketplace Forum.
- Post exact Database (4 decimal places, please) and OS version. By doing so, you'll avoid reactions using features you can't use.
Practice
- Show us what you did (if you tried it yourself), including errors and/or why the result is not what you want.
- Provide DDL (CREATE TABLE, etc.) as appropriate instead of listing the table structure. It'll help people setting up a test set (yes, some people really do that)
- Provide INSERT statements for sample data instead of pasting in or mocking up the results of a SELECT statement.
- Provide your expected result set and explain the rules/reasons that lead to it.
- If you want to post error codes or SQL*Plus output, just copy everything that is on your screen when the error occurred, for instance:
SQL> insert into t2 values (t2_s.nextval, x1) returning id into :x2;
insert into t2 values (t2_s.nextval, x1) returning id into :x2
*
ERROR at line 1:
ORA-00984: column not allowed here
- Do not describe your problem and/or solution in MS Office Word, Excel or similar files and attach them to your message. Some people can not, some do not want to download them.
- Be patient. A lot of people here are just browsing the board once a day.
- Don't think you have more chance if you PM individual members. Just post your question in public: more people can see/answer them that way. Most PM'ed questions are posted to the forum anyway.
- Again, forum members are not here to do your work for you nor to do your homework assignment for you. If you are stuck, we will gladly help you out.
- Don't "wild post", i.e. post a reply that has nothing to do with the original thread.
- If you found an answer yourself, post it. That way we know the issue is resolved and we might learn from it.
Performance TuningPerformance Tuning
Please consider the following when tuning your query:
- The first step is to read the Oracle Performance Tuning Guide in its entirety. It describes the different access paths and teaches you how to use explain plan and tkprof to tune your query. (In Oracle 10g, it also covers the new 10g automated tuning features that may be at your disposal.) While you are reading, you can proceed with the remaining steps below.
- The second step to tuning your query is to gather comprehensive statistics, and re-gather them every time your data undergoes significant change. This means using dbms_stats with cascade => true and a method_opt of at least 'for all indexed columns size 250'.
- The third step is to make sure that all of the columns that should not / will not contain null values are set to not null, that all columns that are used as primary and foreign keys have a primary or foreign key constraint on them, and seriously consider putting indexes on all foreign key columns.
- The fourth step is to re-evaluate your physical database design. Ideally, this step was conducted in development, before the system went live. But regardless, consider all of the available oracle data structures (heap tables, index organized tables, hash clusters, btree clusters, btree indexes, bitmap indexes, partitions, materialized views, and compression).
- The fifth step is to maintain your system at a reasonably up to date patch and version level. Each new version eliminates many older bugs, provides added functionality that you can use for performance, and typically has inherent optimizations at the internal level that cause your existing code to run faster. At the time of this writing, you should be at, or currently upgrading to, at least version 10gR2.
During the tuning process, keep in mind the following:
- Full Table Scans are not always bad, and Index Scans are not always good.
- Routinely rebuilding btree indexes often does more harm than good. Only take action for a reason, and measure/evaluate whether your goal was achieved by the action you took.
- Unless you have a particularly strange circumstance with a single query, and have exhausted all other options, it is generally best to only provide informational hints (such as cardinality, first_rows, and all_rows), rather than to provide specific access plan hints (like full and index).
All about braindumpsAll about braindumps
Introduction
Braindumps are a list of questions and answers from an actual certification exam. Although it might seem to be a good starting point to study, you should take the following points into consideration:
- The answers in the list might be wrong. You don't know whether you are studying/memorizing the correct answers since you are relying on the word of a complete stranger. He could have made a mistake in either the question or the answer.
- It is unethical to just memorize answers in order to get a certification. You should be certified for your knowledge and insight, not for having a good memory.
- It breaks down the value of certifications. Imagine the following situation: I, as an OCP, apply for a job. The guy I have to replace was a "braindump OCP" that wasn't up for the job because he had no actual knowledge. My OCP would be worthless in the eyes of my possible employer just because the employer had lost faith in certifications.
- It is illegal. Full stop. Read the next paragraph if you're not sure about this.
What does Oracle say?
Oracle states in its ORACLE® CERTIFICATION PROGRAM CANDIDATE AGREEMENT the following:
Oracle | You agree that all work submitted by You in completing the Certification Exam and in satisfaction of the Certification Requirements, including Certification Exam answers, assignments, resolutions and personal registration information is entirely Your own. You will neither: (i) provide nor accept improper assistance; nor (ii) use unauthorized materials in attempting to satisfy Certification Requirements.
|
Oracle | You agree that You will not copy, publish, offer to sell, sell, publicly perform or display, distribute in any way or otherwise transfer, modify, make derivative works thereof, reverse engineer, decompile, disassemble or translate any Certification Exam or part thereof.
|
Oracle | The Certification Exam (including without limitation, questions, answers, worksheets, computations, drawings, diagrams, length and number of exam segments and/or questions, or any communication related to the Certification Exam) is the confidential property of Oracle (“Confidential Information”) and is made available to You for the sole purpose of testing your knowledge in the technical area referenced in the title of the applicable Certification Exam.
|
Oracle | You agree (i) to hold Confidential Information in confidence and take all reasonable precautions to protect it; (ii) not to use Confidential Information at any time during the term or after the termination of this Agreement; except as provided herein; and (iii) that You shall not disclose, publish, reproduce or transmit any Confidential Information to any third party, in any form, including without limitation, verbal, written, electronic or any other means for any purpose.
|
Oracle has even contacted OCP candidates:
Oracle Certification Program Candidate
What about OraFAQ?
- We don't host braindump papers. They will be deleted on sight.
- Threads demanding for dumps will be closed or deleted on sight.
Certification Links
- The official site:
- Other interesting links:
MarketplaceMarketplace
General info
It is suitable for the following subjects:
- Career advice
- Vacancies
- Job applications
- Product reviews/recommendations
Bear in mind the following:
- Only Oracle related posts are accepted.
- If applicable, include location information:
- City
- State
- Country (OraFAQ is an international forum with members from all over the world.)
- If applicable, include the job description in the topic title.
- Don't disclose personal information (especially, but not exclusive, email addresses).
- Apply proper casing and proper punctuation.
- Use professional English and no IM speak.
Mind you: there is a zero tolerance concerning spam.
To people declaring their availability for a position
The poster of every entry in a thread is written as a hyper-link. If you follow that link, it will take you to the profile page of the poster.
Most posters in the Marketplace forum have their email address visible in their profile. Therefore, by using that link you will find it easier, more professional, and probable have a far higher chance of successfully informing that person of your availability than posting a reply to a thread in this forum.
Thanks awfully, old boys!Thanks awfully, old boys!
Thanks were given to (alphabetically) David (djmartin), Frank, Frank Naude, Maarten Hereijgers (Maaher), Mahesh Rajendran, Michel Cadot, Scot (smartin), Scott Mackey (scottwmackey), and Todd Barry for their additions, along with Hobbes for proofreading.
[Updated on: Thu, 23 August 2007 12:03] by Moderator Report message to a moderator
|
|
|
Re: Lord of the stickies - (c) Littlefoot [message #261721 is a reply to message #261720] |
Thu, 23 August 2007 07:35 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Introduction
Welcome to OraFAQ Forum! Please, read this document before you start to actively participate in it. Here are guidelines of how to behave on the Forum in order to make it a cozy place to stay.
Some of the most important instructions are:
- Be polite
- Use English language in the main forum
- Provide all relevant information about your problem, including Oracle software version (4 decimal places) and operating system version
- Format your code and make sure that lines do not exceed 80 characters
[Updated on: Thu, 23 August 2007 07:36] Report message to a moderator
|
|
|
Re: Lord of the stickies - (c) Littlefoot [message #261722 is a reply to message #261720] |
Thu, 23 August 2007 07:36 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
How to get a quick answer to your question?
Quote (a Chinese proverb) : | "He who asks a question may appear to be a fool, he who does not ask will remain a fool forever"
|
Before you decide to open a new topic, you should ask yourself:
- First of all: did I try myself? Or am I just hoping that someone else is willing to do my work?
- Did I read the documentation? A lot of questions are answered there. Really.
- Have I checked the FAQ page?
- Did I search the board properly? Have I also tried the Site Search Engine?
A large group of questions posted here are just a déjà -répondu of the past.
- Did I use Google? Even if your question hasn't been answered here, chances are that on other websites someone already has posted an answer.
- Is my question specific to the Oracle database? Now, that may seem obvious since this site is called Oracle FAQs, but we get quite a few questions about Access and MS SQL Server here - and SQL between databases is not always compatible - so please ask any non-Oracle questions elsewhere. It will be to your advantage.
Ok, so you didn't find an answer yet. No sweat, you're welcome to post it here and a lot of people are happy to answer. They can, however, answer only if enough info is provided.
|
|
|
Re: Lord of the stickies - (c) Littlefoot [message #261723 is a reply to message #261720] |
Thu, 23 August 2007 07:37 |
|
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
Posting guidelines
Theory
- Have the courtesy to write in plain English; it is not the first language of most of the participants to this forum, but that is no excuse for poor or nonexistent punctuation.
- If everyone used standard punctuation, like spaces between words and sentences, capitals for the first word of a sentence, a full-stop (period) to mark the end of a statement or a question mark to terminate a question then your requests will be more easily understood and your questions answered more clearly and quickly. Got it? Try it, it isn't that hard.
- Also, stop putting every phrase in a new paragraph, it makes entries deep and hard to read.
- People don't feel encouraged when they have to decipher some gobbledygook.
Abbreviations like "U", "Ur", "U r", "Plz", "prb", "qry" especially tend to get on people's nerves.
IM speak
Instant Messager language, like the (non-exhaustive) list below
- u = you
- ur = you are
- any1 = anyone
- gr8 = great
- pls/plz = please (especially avoid this in topic titles)
- urgnt = urgent (especially avoid this in topic titles)
- wrt = write
- i = I
- im = I am
is not appreciated:- It is hard to read.
- It is unprofessional.
- It doesn't show much respect towards your fellow forum members.
If you don't take time to write in proper English, how can you expect that others would answer properly?
- Always spell check and proof read your messages before posting them.
- As a rule of thumb: be polite. No one is paid for answering your question. The least you can do is show some respect to those who are willing to dedicate some of their spare time to look at your problem.
- If you feel that a message is not admissible for some reason (offending language/opinions, personal attacks, ...), you can report it to the moderator staff. But if you want extra attention for your topic, reporting will act contra productive.
- Don't use uppercase only. It's harder to read and gives the impression you're shouting.
- Choose a topic title that makes sense. A good title might be "ORA-1555 during pl/sql loop"
A less fortunate choice might be "URGNT PLZ!!!!!!!!!!!!"
Avoid the following keywords: urgent/please/help/now/immediately (and derivatives)
- Choose the appropriate forum. If in doubt, don't worry - moderators can always move it
- Don't cross-post. Duplicates will be removed.
- Commercial posts are admitted only in the Marketplace Forum.
- Post exact Database (4 decimal places, please) and OS version. By doing so, you'll avoid reactions using features you can't use.
Praxis
- Show us what you did (if you tried it yourself), including errors and/or why the result is not what you want.
- Provide DDL (CREATE TABLE, etc.) as appropriate instead of listing the table structure. It'll help people setting up a test set (yes, some people really do that)
- Provide INSERT statements for sample data instead of pasting in or mocking up the results of a SELECT statement.
- Provide your expected result set.
- If you want to post error codes or SQL*Plus output, just copy everything that is on your screen when the error occurred, for instance:
SQL> insert into t2 values (t2_s.nextval, x1) returning id into :x2;
insert into t2 values (t2_s.nextval, x1) returning id into :x2
*
ERROR at line 1:
ORA-00984: column not allowed here
- Do not describe your problem and/or solution in MS Office Word, Excel or similar files and attach them to your message. Some people can not, some do not want to download them.
- Be patient. A lot of people here are just browsing the board once a day.
- Don't think you have more chance if you PM individual members. Just post your question in public: more people can see/answer them that way. Most PM'ed questions are posted to the forum anyway.
- Again, forum members are not here to do your work for you nor to do your homework assignment for you. If you are stuck, we will gladly help you out.
- Don't "wild post", i.e. post a reply that has nothing to do with the original thread.
- If you found an answer yourself, post it. That way we know the issue is resolved and we might learn from it.
|
|
|
|
|
Goto Forum:
Current Time: Mon Jan 06 22:27:44 CST 2025
|