Re: Best way to optimize this database?
Derrick Shields wrote:
>
> Because many queries on my Website will be search terms, and the
> database is so big, I will create indexes for the name + city
> columns. But is that it? Is that all I need to do for an optimized
> database?
indexing will improve the search time, also searching for a string takes
longer time than searching for a value, so it could be a point to break out
the state to it's own table and you leave a "state key" column instead.
In the new table you can have "state key","state name" and "state short form",
this way the person can search on both NJ and New Jersey. This will also help
you to uniform the data, so you won't have "New Jersey", "new Jersey", "New
jersey", "NewJersey", "NJ" and so on...
> Some of the Oracle guys I work with on a daily basis suggesting
> looking into partitions... is that necessary on a Database this
> size?
Of course the file system affects the speed of the database, I would recommend
JFS, it has a quite good performance overall and is stable too.
> Second part to the question: if I am editing a .sql dump, where in the
> code can I put the CREATE INDEX code? I apologize if this seems
> basic, I am not a DBA be any means and until recently had only been
> working with small databases an no need for advanced SQL syntax.
The .sql file is just a load of SQL statements, create your indexes after you
stored all your data.
--
//Aho
|