10 Essential SQL Tips for Developers

10 Essential SQL Tips for Developers

Jun 4th in Other by Eric Shafer

SQL is yet another essential language for developers wishing to create data-driven websites. However, many developers are unfamiliar with various aspects of SQL; so in this article, we'll analyze ten essential tips.

PG

Author: Eric Shafer

Eric Shafer is a unique hybrid of talents. A computer technology student and professional by trade, Eric also has a keen interest in graphic and web design, running his own blog, Presidia Creative. He also works extensively with music and professional audio, and has written several articles for AudioTUTS+ as well.

1. Use The Right Language

Web developers often have a plethora of languages at their disposal. It is crucial for developers to use the proper language for the job.

Let's review the following code. In the first example, the developer is selecting all columns and all rows from the customer table. In the second example, the developer is selecting only the first name, last name and address from the customer table for a single customer with ID 1001. Not only does the second query limit the columns that are returned, it will also perform better.

SELECT * FROM customer;
SELECT firstName, lastName, shippingAddress FROM customer WHERE customerID = 1001;

When you are writing code, make sure that it works efficiently.

Too many developers are satisfied with code that performs adequately on 100 rows of data, with little thought ahead to when the database will have 10,000 rows.

2. Secure Your Code

Databases store valuable information. Because of this fact, databases are often prime targets for attack. Many developers are unaware that their code has critical security vulnerabilities, which is a very scary fact not only for clients, but also for you. Currently, developers can be held legally accountable if their own personal negligence results in a database security risk that is then exploited.

In case you aren't convinced about the seriousness of database security, these two articles should help drive the point home:

"The FBI and Virginia State Police are searching for hackers who demanded that the state pay them a $10 million ransom by Thursday for the return of millions of personal pharmaceutical records they say they stole from the state's prescription drug database." Read the Washington Post article

"Kaspersky Lab, a Moscow-based security company, admitted today that a database containing customer information had been exposed for almost 11 days and that it only learned of the breach when Romanian hackers told the firm about it last Saturday." Read the ComputerWorld article

Let's review another example using pseudo-code.

// Theoretical code
txtUserName.setText("eshafer' OR 1=1");
query = "SELECT username, password FROM users WHERE username = '" + txtUserName.getText() + "';";

// Final statement
query = "SELECT username, password FROM users WHERE username = ejshafer OR 1=1;"

Hopefully you looked at that code above and noticed the vulnerability. The query will end up selecting all username and password records from the table, because 1 always is equal to 1. Now, this particular example doesn't accomplish much for the would-be hacker. However, there are nearly limitless possibilities for additional malicious code that can be added with catastrophic results.

How Can You Write Secure Code?

The solution is often DBMS specific; that is, it varies between MySQL, Oracle or SQL Server. In PHP with MySQL, for example, it is usual to escape parameters using the function mysql_real_escape_string before sending the SQL query. Alternatively, you can utilize prepared statements to "prepare" your queries. Make it your mission to understand the DBMS with which you are working and the inherent security issues.

SQL injection isn't the only security vulnerability for databases and developers to worry about, however, it is one of the most common methods of attack. It is important to test your code and be familiar with the latest security issues for your DBMS in order to protect against attacks.

3. Understand Joins

Single table SQL select statements are rather easy to write. However, business requirements often dictate that more complex queries must be written. For example, "find all orders for each customer, and display the products for each order". Now, in this particular situation, it would be likely that there is a customer table, an order table, and an order_line table (the last would be to resolve a possible many-to-many record relationship). For those who are slightly more familiar with SQL, it is readily apparent that a table join, actually, two table joins will be required for this query. Let's look at some sample code.

SELECT customer.customerID, order.order_id, order_line.order_item
FROM customer
	INNER JOIN order
		ON customer.customerID = order.customerID
	INNER JOIN order_line
		ON order.orderID = order_line.orderID;

Alright, simple enough. For those who don't know, the code above is an inner join. More specifically, the code above is an equi-join. Let's define the various types of joins.

Inner Joins: The basic purpose of inner joins is to return matching records.

Outer Joins: Outer joins do not require each record to have a matching record.

  • Left outer join: A left outer join of tables A and B will return all matching records of A and B, as well as any non-matched records from the left table, in this case, A.
  • Right outer join: A right outer join of tables A and B will return all matching records of A and B, as well as any non-matched records from the right table, in this case, B.
  • Full outer join: A full outer join of tables A and B will return all matching records of A and B, as well as any non-matched records from both tables.

Special thanks to Ronald Erdei for the images.

Self Joins

There is one last type of join that must be considered, which is a self join. A self join is merely a join from a table to itself.

EMPLOYEE TABLE
-EmployeeName
-SupervisorID

In this situation, in order to find which employees are supervised by a given employee, a self join would be required.

Hopefully this clarifies the basic tenets of joins, as they are one of the primary features of SQL that makes it such a powerful database language. Make sure you use the proper join for your given situation.

4. Know Your Data Types

In SQL, typically each table column has an associated data type. Text, Integer, VarChar, Date, and more, are typically available types for developers to choose from.

When developing, make sure you choose the proper data type for the column. Dates should be DATE variables, numbers should be a numeric type, etc. This becomes especially important when we deal with a later topic: indexing; but I'll demonstrate an example of poor knowledge of data types below:

SELECT employeeID, employeeName
FROM employee
WHERE employeeID = 112457891;

Looks fine based on what we currently know, correct? However, what if employeeID is actually a string. Now we've got a problem, because the DBMS might not find a match (because string data types and integers are different types).

Therefore, if you're using indexing, you'll probably be perplexed as to why your query is taking forever, when it should be a simple index scan. This is the reason that developers need to pay special attention to data types and their applications. Non-key attributes which are IDs are often string types, as opposed to integers, because of the increased flexibility that is granted. However, this is also a trouble area for junior developers, who assume that ID fields will be integers.

Properly utilizing data types is essential to proper database programming, as they directly lead to query efficiency. Efficient queries are essential to creating quality, scalable applications.

5. Write Compliant Code

All programming languages have standards which web developers should be aware, and SQL isn't any different. SQL was standardized by ANSI and then ISO, with new revisions to the language being occasionally submitted. The latest revision is SQL:2008, although the most important revision that developers should be aware of is SQL:1999. The 1999 revision introduced recursive queries, triggers, support for PL/SQL and T-SQL, and a few newer features. It also defined that the JOIN statements be done in the FROM clause, as opposed to the WHERE clause.

When writing code, it is important to keep in mind why standards-compliant code is useful. There are two primary reasons why standards are used. The first is maintainability, and the second is cross-platform standardization. As with desktop applications, it is assumed that websites will have long lifespans, and will go through various updates to add new functionality and repair problems. As any systems analyst will tell you, systems spend a majority of their lifespan in the maintenance phase. When a different programmer accesses your code in 2, 5 or 10 years, will they still be able to understand what your code is doing? Standards and comments are designed to promote maintainability.

The other reason is cross-platform functionality. With CSS, there is currently an ongoing standards battle between Firefox, Internet Explorer, Chrome, and other browsers about the interpretation of code. The reason for the SQL standards is to prevent a similar situation between Oracle, Microsoft and other SQL variants such as MySQL.

6. Normalize Your Data

Database normalization is a technique to organize the contents of databases. Without normalization, database systems can be inaccurate, slow, and inefficient. The community of database professionals developed a series of guidelines for the normalization of databases. Each 'level' of normalization is referred to as a form, and there are 5 forms, total. First normal form is the lowest level of normalization, up to fifth normal form, which is the highest level of normalization.

  • First Normal Form (1NF): The most basic level of data normalization, first normal form requires the elimination of all duplicate columns in a table, and also requires the creation of separate tables for related data, and identification of each table with a primary key attribute.
  • Second Normal Form (2NF): Meets all the requirements of first normal form, and creates relationships between tables using foreign keys.
  • Third Normal Form (3NF): Meets all the requirements of second and first normal forms, and removes all columns that are not dependent upon the primary key. Third normal form also removes all derived attributes, such as age.
  • Fourth Normal Form (4NF): Fourth normal form adds one additional requirement, which is the removal of any multi-valued dependencies in relationships.
  • Fifth Normal Form (5NF): Fifth normal form is a rarer form of normalization, in which case join dependencies are implied by candidate keys (possibly primary key values).

In the reality of database development, getting to 3NF is the most important jump. 4NF and 5NF are a bit more of a luxury (and sometimes a nuisance) in database development, and are rarely seen in practice. If you're struggling with the concepts, or remembering the first three forms, there is a simple relation. "The key, the whole key, and nothing but the key.", which relates to 1NF, 2NF, and 3NF.

The Benefits of Normalization

Now, without venturing too far into database theory, let's simply focus on the benefits of normalization. As the data progresses through the normalization forms, it becomes cleaner, better organized, and faster. Now, with a small database that has only 5 tables and 100 rows of data, this won't be readily apparent. However, as the database grows, the effects of normalization will become much more apparent with regards to speed and maintaining data integrity. However, there are some situations in which normalization doesn't make sense, such as when normalizing the data will create excessively complex queries required to return the data.

7. Fully Qualify Your Database Object Names

Now, this is a commonly ignored point; in fact, all the sample code I've demonstrated in this tutorial has essentially violated this tip. In terms of database development, a fully qualified object name looks as follows: DATABASE.schema.TABLE. Now, let's look at why fully qualified names are important, and in what situations they are necessary. The purpose of a fully qualified object name is to eliminate ambiguity. Beginning developers rarely have access to multiple databases and schemas, which complicates the issues in the future. When a given user has access to multiple databases, multiple schemas, and the tables therein, it becomes crucial to directly specify what the user is attempting to access. If you have an employee table, your boss has an employee table, and the schema that your web application is running on has an employee table, which are you really attempting to access?

Logically, the fully qualified name would look like DATABASE.SCHEMA.OBJECTNAME, however, syntactically (ie, in executable statements), it would simply be SCHEMA.OBJECTNAME. Although various DBMSes do have various syntax differences, the above style is generally applicable.

-- Not ''SELECT * FROM table''
SELECT * FROM schema.TABLE

Fully qualifying your database names is important when working with databases that are larger and are used by multiple users and contain multiple schemas. However, it is a good habit to get into.

8. Understand Indexing

A database index is a data structure that improves the speed of operations on a database table. Indexes can be created using one or more columns of a database table, providing the basis for both rapid random look ups and efficient access of ordered records. Indexing is incredibly important when working with large tables, however, occasionally smaller tables should be indexed, if they are expected to grow. Small tables that will remain small, however, should not be indexed (for example, if your book is 1 page, does it make sense to turn to the index?)

Many developers write their code and test it on a table with 10, or 100 rows, and are satisfied when their code performs adequately. However, as the table grows to 10,000, or 1,000,000 rows, the code slows to a snail's pace, and the client might as well go out to lunch waiting for the code to execute.

When a query searches a database for a matching record, there are two ways in which the search can be performed.

  • The first, and the slowest way is a table scan. In a table scan, the query searches every record in the table looking for a match.
  • The second, and the faster way is an index scan. In an index scan, the query searches the index to find the record. In non-database terms, a table scan would be the equivalent to reading every page in a book looking for a word, while an index scan would be the equivalent of flipping to the back of the book, finding the word, flipping to the specified page, and then reading the words on the page to find the word.

It is important to remember that indexes need to be rebuilt occasionally, as data is added to the table. Additionally, while indexes increase data access performance, it slows the modification of data. Because of this, most DBMSes have an option to temporarily disable an index to facilitate mass data modification, and then allow it to be re-enabled and rebuilt later.

9. Properly Use Database Permissions

When working with a database that has multiple users, it is important to properly handle various database permissions. Obviously, most databases have an administrator user, but does it always make sense to run your queries as the administrator? Additionally, would you want to provide all your junior developers and users with your administrator credentials in order to write their queries? Most likely not. The various possible permissions for your database depend on your DBMS, but there are common themes between them.

In MySQL, for example, typing "SHOW TABLES" will reveal a list of tables on your database, of which you will likely notice a 'user' table. Typing 'DESC user' will reveal that there are various fields on the user table. Along with a host, username and password, there is also a list of privileges that can be set for a user. Additionally, there is a 'db' table that governs more privileges for a specific database.

SQL Server provides the GRANT, DENY, and REVOKE statements to give or take away permissions from a user or role. Additionally, SQL Server provides roles such as db_writer, db_reader. Often, unknowledgeable developers grant these roles (as opposed to creating their own, custom roles) to other users, resulting in overall lowered database security, as well as the possibility of a user performing an unwanted operation.

Properly managing your database user permissions is essential to managing not only security, but also providing a foundation for faster development and protecting data integrity.

10. Know Your DBMS Limitations

Databases are powerful tools, however, they aren't without limitations. Oracle, SQL Server, and MySQL all have unique limitations on things such as maximum database sizes, maximum number of tables, and others. Many developers unknowingly choose a DBMS solution for their project without planning or considering the later requirements of their database.

Refer to your DBMS manual for the various limitations, for example, SQL Server limitations are located on the MSDN Website: http://msdn.microsoft.com/en-us/library/ms143432.aspx

Conclusion

In this article, we reviewed 10 essential tips for SQL developers. However, there are many other useful SQL techniques that could be mentioned; so please leave your thoughts in the comments, whether you think this article covered all the essential topics, or you think one was left out. Keep developing, and remember, the code you write supports the internet infrastructure, and without you, the internet would not be as successful as it is.


Related Posts

Check out some more great tutorials and articles that you might like

Enjoy this Post?

Your vote will help us grow this site and provide even more awesomeness

Plus Members

Source Files, Bonus Tutorials and
More for $9 a month for all TUTS+
sites in one subscription.

Join Now

User Comments

( ADD YOURS )
  1. PG

    Web010 June 4th

    Nice tut, but for begginers. Anyway thanks, great tutorial. :)

    ( Reply )
    1. PG

      barry June 4th

      Ain’t that what most tutorials are for? Experts aren’t a good niche for tutorials. ^^

      ( Reply )
      1. PG

        Rik Girbes June 4th

        xD good point! :D

      2. PG

        Banger July 6th

        Oh, I’ve had coworkers who claimed to be “experts”, but neither sanitized their database inputs nor used more than one index – PRIMARY of course. Full table scans FTW!
        Nobody sobbed when they quit. ;-)

  2. PG

    Giuseppe Maxia June 4th

    The MySQL Reference Manual in your picture is 7 years old!
    It was published in 2002.
    http://oreilly.com/catalog/9780596002657/

    Probably the MySQL online reference manual is more appropriate (http://dev.mysql.com/doc/refman/5.1/en/)

    Giuseppe

    ( Reply )
  3. PG

    Jerichvc June 4th

    Number 3 on mysql join will help me out, i hope there is a separate tutorial for mysql joins in a simple and practical way. every time i sleep, sometimes i forgot my foundation with mysql joins :D . thanks.

    ( Reply )
    1. PG

      Robert June 5th

      Ditto on another tutorial ‘just’ for the various JOINS in MySQL. Joining tables gives me such a headache.

      ( Reply )
    2. I too need elaborated tutorials on SQL JOINS. They cause me headache always.

      ( Reply )
  4. PG

    Sameth June 4th

    Eric,

    I love this article. It’s a nice review for me. “Fully Qualify Your Database Object Names,” is new to me and I appreciate that you covered it.

    keep up the good work.

    ( Reply )
    1. PG

      Neil June 4th

      IMO – I think that is over kill in most cases

      ( Reply )
  5. PG

    Dario Gutierrez June 4th

    I’m a begginer it will be really useful. Cool tips.

    ( Reply )
  6. Nice tutorial, would be nicer some advices related to the indexing. That part its very often ignored by developers :) .

    ( Reply )
  7. PG

    IRV June 4th

    Nice and useful tutorial, many develepers don’t know the basics about data bases and SQL.
    By the way, you missed BCNF (Boyce-Codd normal form) and 6NF, the order is 1NF, 2NF, 3NF, BCNF, 4NF, 5NF and 6NF. While the three last normal forms aren’t very used, BCNF is important cause it solves some specific dependency problems that 3NF doesn’t do…
    Read here for an example:
    http://en.wikipedia.org/wiki/Boyce-Codd_normal_form

    ( Reply )
  8. PG

    Pedro Magalhães June 4th

    Thanks for the tips…They are very useful.

    ( Reply )
  9. PG

    Philo June 4th

    Great Article! :)
    Thanks!

    ( Reply )
  10. PG

    kreativeKING June 4th

    Not my area, but it seems like a great tutorial. I got lost at Joins lol.

    ( Reply )
  11. PG

    Kent June 4th

    The first two sentences of the indexing portion are taken EXACTLY from the first two two sentences of the Wikipedia article on indexing. :/

    ( Reply )
    1. PG

      Rik Girbes June 4th

      :D Did you do a search on google?!?! xD

      ( Reply )
  12. PG

    Crysfel June 4th

    well done!

    ( Reply )
  13. PG

    Morten Najbjerg June 4th

    Finally a good explanation of SQL join ! :)

    ( Reply )
  14. PG

    Myfacefriends June 4th

    another great tuts! thanks.

    ( Reply )
  15. PG

    Martin June 4th

    What about aliasing tables? I always do it, and I find the code a lot easier to read when it is done.

    ( Reply )
  16. Very useful on this, I will en devour to use SQL’s power more effectively.

    ( Reply )
  17. PG

    rizq June 4th

    Nice Tut’s

    Thanks

    ( Reply )
  18. PG

    G. Od June 4th

    Really great tips for developers like me. Bookmarked my important section. Tnx for this.

    ( Reply )
  19. PG

    mrkdevelopment June 4th

    Id also suggest a second part to this that should cover triggers, views and stored procedures.

    These saves heaps of time and make PHP apps run heaps faster.

    CakePHP has alot of love for this stuff which is where my experience comes.

    ( Reply )
  20. PG

    Yoosuf June 4th

    its a great one!

    ( Reply )
  21. PG

    Cody June 4th

    Thanks for the tips, very helpful.

    ( Reply )
  22. PG

    Sujith PV June 4th

    Hi man
    this is very cool article

    ( Reply )
  23. PG

    Harald Groven June 4th

    After 10 years of work with MySQL, here are my favorite recourses:

    Common MySQL queries
    http://www.artfulsoftware.com/infotree/queries.php?&bw=1440

    A Visual Explanation of SQL Joins
    http://www.codinghorror.com/blog/archives/000976.html

    Selecting Group-Wise Maximums
    http://kristiannielsen.livejournal.com/6745.html

    Comparison of different SQL implementations
    http://troels.arvin.dk/db/rdbms/#cli-list_of_databases

    O’reilly MySQL Cookbook
    O’Reilly SQL hacks
    Anything by Joe Celko

    ( Reply )
  24. Maybe it’s for beginners but from time to time it’s worth refreshing the basics ;)

    Thanks!

    ( Reply )
  25. PG

    Fledder June 5th

    Good article, but I don’t agree with this part:

    “Without normalization, database systems can be inaccurate, slow, and inefficient.”

    Normalized databases are not faster than a denormalized database. In fact, as soon as you hit a serious scalability/performance issue, a common strategy is to DEnormalize your database since that is faster (less joins and index scans). Denormalizing does come at the expense of data consistency. DEnormalizing is also required when you are using partitions, so it is definitely not always a bad thing.

    ( Reply )
  26. PG

    Alex June 5th

    In mysql using the explain command before executing a query has become an essential for me…not many people seem to know this one tho.

    ( Reply )
  27. PG

    Ben W June 5th

    You could make the example in #1 even more efficient by adding LIMIT

    ( Reply )
  28. PG

    Phil June 5th

    This will be useful as ever!

    ( Reply )
  29. PG

    WY June 5th

    Would the tips are relevant to postgresql (http://www.postgresql.org) too?

    ( Reply )
  30. PG

    John McMullen June 5th

    *Bookmarked*

    Thanks for another great article.

    ( Reply )
  31. PG

    Jay June 5th

    Is there a security advantage to having a different db user for your site visitors which is set to read only (my site won’t allow commenting etc) or isn’t that something that is easily exploited ?

    ( Reply )
  32. PG

    Chrasty June 5th

    Great post, thanks a lot!

    ( Reply )
  33. PG

    Mikhail Kozlov June 5th

    Very nice.

    ( Reply )
  34. PG

    DemoGeek June 5th

    I like the way you’ve explained the JOINs. You should have mentioned the fact that different databases have a slightly different flavor of these joins (at least with the way you express those joins) and some databases more than the joins listed here. Just FYI.

    ( Reply )
  35. PG

    cvasilak June 5th

    Nice article, thanks and keep up the good work

    ( Reply )
  36. PG

    Eric Shafer June 5th

    Hey everyone,

    I wanna think you all for the various comments, means a lot to me knowing that you appreciated the article and were willing to provide various critiques.

    @Guiseppe: Unfortunately, the old O’Reilly Manual was the only one I could find a high quality stock image for.

    @IRV: You’re right, I had been debating on whether or not to mention Boyce-Codd Normal Form, I had decided to leave it out since I wasn’t sure too many readers would understand much about normalization, but in retrospect, perhaps I should’ve left it in. As far as the other normal forms, I don’t see them used much and they weren’t really worth mentioning.

    @Martin: Aliasing tables is a great practice and it really speeds up your own code writing, you’re right.

    @mrkdevelopment: The problem with doing an article to cover triggers, views, etc is that it’s often very DBMS specific. Personally, I’ve dealt more with Oracle than with SQL Server or MySQL, so I’m rather well versed with PL/SQL, but not so much with T-SQL. Each DBMS has their own quirks that make it difficult to write a generic article about them.

    @Harald: Thanks for the links, hopefully some readers find them helpful!

    @Fledder: You’re right, normalization isn’t always the right thing to do. However, in general, the first three normal forms make a database much more efficient.

    @DemoGeek: True, various DBMSes have a bit different join qualities, however, I tried to keep it as generic as possible. I had considered adding in a little about equi-joins, etc, but I wasn’t sure if people would quite understand the subtleties of them.

    Again, thanks everyone for reading and I appreciate the feedback!

    ( Reply )
  37. PG

    desarrollo web June 5th

    Excelent article!

    Thanks.

    ( Reply )
  38. PG

    Shahriat Hossain June 6th

    Thanks for this post but If u provide more details about indexing in your future article which is very important for the SQL developer would be highly appreciated.

    ( Reply )
  39. PG

    Juan Carlos June 6th

    Great post! Very helpful!

    ( Reply )
  40. PG

    James Hogan June 7th

    Having studied relational databases in second year at college i ve been looking to refresh my skills, this helps, thanks, I love this site :)

    ( Reply )
  41. PG

    craig June 8th

    nice, even though I don’t understand most of it

    ( Reply )
  42. PG

    l4u June 8th

    Looks really useful. Gonna bookmark for a reference :)

    ( Reply )
  43. PG

    Ejaz June 8th

    Excellent Tutorial

    ( Reply )
  44. PG

    Csaba June 8th

    Exciting tips collection

    ( Reply )
  45. PG

    awake June 8th

    Do you by any chance know any open source data generator for databases?

    That way it’s easy to generated reaonable data that can be used to test a web app.

    ( Reply )
  46. Nice tips! Keep on posting! :)

    ( Reply )
  47. PG

    Vitaly Babiy June 12th

    SQL is very important for any developer thanks for the suggestions

    ( Reply )
  48. PG

    Joe June 15th

    I had a great time learning SQL from GalaXQL. http://sol.gfxile.net/galaxql.html

    It goes into most common SQL scenarios but is an interactive applitutorial

    ( Reply )
  49. PG

    Jacob June 15th

    Create tutorial, all tips are useful and well described to easiest understanding.

    ( Reply )
  50. PG

    Mida June 30th

    Very nice tips, thanks alot

    ( Reply )
  51. PG

    Ron July 1st

    Nicely done!

    In regards to fully qualifying the database object name, it is probably overkill if you are working on a smaller application / database. However my experience has been that it is amazingly important in any medium-to-enterprise level application.

    ( Reply )
  52. PG

    Manuel July 2nd

    Impressing basic approach to a lot of problems.
    Not only that there are more points to be considered, as written in the conclusion, also, those already mentioned points need to be considered much more thoroughly.

    ( Reply )
  53. PG

    John July 15th

    You’d be better using

    SELECT firstName, lastName, shippingAddress FROM customer WHERE customerID = 1001
    LIMIT 1;

    on single row searches

    ( Reply )
  54. PG

    KubidaQ July 15th

    You should just learn attacks which will be come from hackers. If you don’t know your enemy’s tactics, you will fail.

    ( Reply )
  55. PG

    Richard S. August 25th

    I would like to see more information about tables joins because there so little information on the Internet and it seems to be very helpful for all of us.

    ( Reply )
  56. PG

    เพชร September 22nd

    very helpful tutorial

    ( Reply )
  57. PG

    Tony.C October 25th

    Always use stored procs, or your local equivalent to avoid sql injection issues.

    And know our execution engine! Sometimes something as small as moving a where clause into a join clause can save a large percentage of execution cost(And also give you a demo on why code in a “SELECT .. FROM” section is bad).

    And get the right IDE, there is always work to do on very large databases, and automating as much of it as possible will save you time and allow for more work on optimisation.

    ( Reply )
  1. Arrow
    Gravatar

    Your Name
    October 25th