Top "Database-optimization" questions

Delete statement in SQL is very slow

I have statements like this that are timing out: DELETE FROM [table] WHERE [COL] IN ( '1', '2', '6…

sql sql-server sql-server-2008 database-optimization
Solution for speeding up a slow SELECT DISTINCT query in Postgres

The query is basically: SELECT DISTINCT "my_table"."foo" from "my_table" WHERE... Pretending that I'm 100% certain the DISTINCT portion …

sql database postgresql database-optimization
Will indexing improve varchar(max) query performance, and how to create index

Firstly, I should point out I don't have much knowledge on SQL Server indexes. My situation is that I have …

sql-server sql-server-2008 indexing full-text-indexing database-optimization
Improving performance of Sql Delete

We have a query to remove some rows from the table based on an id field (primary key). It is …

sql database sybase query-optimization database-optimization
How do I know when to index a column, and with what?

In docs for various ORMs they always provide a way to create indexes, etc. They always mention to be sure …

database database-indexes database-optimization
One big query vs. many small ones?

I'd like to know, which option is the most expensive in terms of bandwith and overall efficiency. Let's say I …

database optimization bandwidth database-optimization
Best way to count rows from mysql database

After facing a slow loading time issue with a mysql query, I'm now looking the best way to count rows …

mysql database database-optimization
What is Ideal value to set for long_query_time in slow query log for magento?

To optimize magento we enable slow query log in mysql. What is ideal value for query_long_time especially for …

mysql magento database-optimization
MySQL Optimization: EXPLAIN "Extra" column contains "Using Where"

So I always thought that seeing "Using Where" in the Extra column was a good thing. However, I was planning …

mysql database-optimization database-indexes
Optimal database structure - 'wider' table with empty fields or greater number of tables?

I need to fit in additional data into a database, and I have a choice between modifying an existing table (…

database optimization database-design database-optimization