473,569 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to write a query to make its execution time better .And the standards.

2 New Member
hi all,
i am manikandaprabhu .
i want to know the standards used for writing the query . that is if we want to retrieve the data from database from abig table as well as from the small table . first from which table we should retrieve the datas.. like that what are the procedures to be followed to write query in a standard
Mar 26 '08 #1
1 1141
amitpatel66
2,367 Recognized Expert Top Contributor
Hi,
The standards for SQL / PLSQL coding varies from one organization to another. The basic standards would be:

1. All keywords should be in CAPS
2. Table names, column names should be in Lower case
3. Variables declared in PLSQL code should start with v_, ie vn_num1 for NUMBER, vc_ename for VARCHAR and so on


Regarding fetching of data from either a big or small table, it depends on which table actually stores the data, based on which you will retrieve the data from. There are many factors that you can consider to write a good performance Query. Your first step would be to learn about learning SQL, then once you are confident about writing SQL queries, you can look for writien better peroformance queries. Please go step by step learning for better understanding of Oracle SQL and PL/SQL.
Mar 26 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2345
by: Andrew Mayo | last post by:
There is something very strange going on here. Tested with ADO 2.7 and MSDE/2000. At first, things look quite sensible. You have a simple SQL query, let's say select * from mytab where col1 = 1234 Now, let's write a simple VB program to do this query back to an MSDE/2000 database on our local machine. Effectively, we'll
6
9947
by: UnixSlaxer | last post by:
Hello, Running a query for the first time on DB2 takes a fixed amount of time. But when query is executed for the second time, the amount of time is usually less since the query is (most probably) cached already. I would like to clear out the DB2-UDB 8.2 query cache (I want the previous execution time again). Any advice would be...
7
2377
by: Andrea | last post by:
Hi there - I'm hoping someone can help me; I've been struggling with this for a few days! :-) I have a webpage that is comprised of many forms containing questions. As the user answers one of the questions, that form is hidden and the next is displayed. Also, as the user answers each question a "count" variable is updated based on...
3
1572
by: serge | last post by:
How do I determine which method I should use if I want to optimize the performance of a database. I took Northwind's database to run my example. My query is I want to retrieve the Employees' First and Last Names that sold between $100,000 and $200,000. First let me create a function that takes the EmployeeID
88
8011
by: Peter Olcott | last post by:
Cab you write code directly in the Common Intermediate language? I need to optimize a critical real-time function.
3
6861
by: comp_databases_ms-sqlserver | last post by:
This post is related to SQL server 2000 and SQL Server 2005 all editions. Many of my stored procedures create temporary tables in the code. I want to find a way to find the query plan for these procs Repro --*********************************** use pubs go CREATE PROCEDURE Test @percentage int
14
2557
by: Jeroen | last post by:
Hi all, I've got a question about writing a library. Let me characterize that library by the following: * there is a class A which is available to the user * there is a class B that is used in severel 'underwater operations' * there is a list which stores objects of class B There are several issues I'm not sure about:
1
1949
by: TF | last post by:
This group came through for me last time so here we go again. My page shows paint colors, brand name, product code, etc in a gridview with the background matching the paint color. Several links on the page are used to call itself with querystring values for brand, thinner, finish, etc. The page must show all colors if the querystring is...
1
984
by: manikandaprabhu | last post by:
hi all, i am manikandaprabhu. can you help me out in writing the query which should meet the standards and also must have less exection time.how to write a perfect query.And the procedures and rules that have to be followed to write a sql query which optimizes the execution time.
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.