How exactly is a database indexed?
How exactly is a database indexed?
I have a database with over 700,000 records in it, and it is contantly creating a file in /tmp, up to 2GB and using up all the cpu. Would indexing help with that problem? |
Nobody can answer your question fully without knowing WHAT database this is.
|
Quote:
If you're using a SQL-based data base, you can (for most such data bases) have several different indexes on the same table, each index "tuned" for specific queries. Generally, though, the design of a data base starts by analyzing the purpose for which the data base is being created, and the questions that the data will address, Then the data is separated into one of the normal forms (usually the third) and a "unique key" assigned to each row of each table. If this is done properly, then almost every query can be answered by combining information from the data base tables using the "unique key" values from the several tables used to answer the query. Again, referring to SQL-based data bases, you can (usually) create a "view" of the data base for common queries, and index the view to speed recovery of specific rows from the view. |
All times are GMT -5. The time now is 03:57 PM. |