Skip to content
Advertisement

Tag: indexing

Nonclustered indexes will partially cover the select query

I having a non-clustered indexes created in my SQL database server with Include keyword. Please find my non-clustered index created for FACTORS table. if am having a SELECT query like below will my indcxes FACTORS_BKEY_PNO_IDX cover my select query. ( i mean will this index will help my below select query to retrieve records faster or do i need to

MySQL GROUP BY slows down query x1000 times

I’m struggling with setting up proper, effective index for my Django application which uses MySQL database. The problem is about article table which for now has a little more than 1 million rows and querying isn’t as fast as we want. Article table structure looks more or less like below: After many tries I came that below index gives best

Indexing (x 4 OR y 5)

I am searching for an index to make the following quick: The query is a delete and reads: so it deletes all rows that do not match a few hundred criteria on t1 and t2. explain gives a sequential scan and rearranges the query: Can I create an index that will avoid that full scan? Thanks in advance! Answer Although

Determining what index to create given a query?

Given a SQL query: How do you determine what index to write to improve the performance of the query? (Assuming every value to the right of the equal is calculated at runtime) Is there a built in command SQL command to suggest the proper index? To me, it gets confusing when there’s multiple JOINS that use fields from both tables.

MySql improve GROUP BY ORDER BY query with index

I have a table like this: the goal is to query how many products have been sold per day, so the query is: The output is: Ok. Now let us suppose we have a scenario with several records and this query has to be run several times per day, we need to care about performance now in order to retrive

Advertisement