Article Preview
Buy Now
| Print: | |
| PDF: |
Databases for Real
Performance Tips
Issue: 2.6 (July/August 2004)
Author: Paul Lefebvre
Author Bio: Paul Lefebvre is President and Chief Architect of LogicalVue Software, producers of SQLVue, RBUnit and many other products.
Article Description: No description available.
Article Length (in bytes): 4,568
Starting Page Number: 32
RBD Number: 2615
Resource File(s): None
Related Link(s): None
Known Limitations: None
Excerpt of article text...
Generally speaking, it is pretty easy to make a database. But after you have used it a while and have accumulated lots of data, it may start to slow down. There are several simple things you can do to help with performance. These tips are relatively generic and can be applied to any database engine.
SQL
Don't Use SELECT *
This is a common mistake. Instead of SELECT *, which sends all columns from the database to your application, list only the columns you need in the order you want. This decreases the amount of work the database has to do and also decreases the amount of network traffic (if you are using a database server).
Minimize Joins
Database joins are a relatively expensive operation. In certain situations your query may become faster if you break it up into separate queries without any joins. This is particularly beneficial for complicated queries. Sometimes the database engine can process two simple queries much faster than a single complex query.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|










