MySQL Forums
Forum List  »  Backup

Re: Backup and trimming data idea
Posted by: newbie Shai
Date: June 29, 2012 07:12AM

Dear Rick,
Can I say the rule as look for all the where key and the order by combine them as one index even how many fields it could be. But some times one query may require just one of the key for the where statement and another query may require more then one field to look for. So in this case can I have index(a) then index(a,b). How about join statement where the where keys come from different tables?

I am not clear for this.

> index(a,b) or index(b,a) is there any difference
Think about fields last_name and first_name. Let's say you have
INDEX(last_name, first_name)
like in a Phone Directory. How, let's say you want
WHERE last_name LIKE 'J%' and first_name = 'Rick'
That index would be useless, but this would be useful:
INDEX(first_name, last_name)

My question here why is this index(last_name,first_name) useless when we are looking it via the like 'J%'? Kind of confuse here can you give me details for this?


Regarding your link which you share I read about chunk deletes but there is a risk of table locking right? So what best option am I left then only I guess partitioning but my scenario is a link of tables. I was thinking worse case I partition each tables separately based on date then drop them separately? What is your idea on this?

Options: ReplyQuote


Subject
Views
Written By
Posted
3516
June 22, 2012 07:34PM
1688
June 23, 2012 05:23PM
1747
June 23, 2012 05:36PM
1763
June 24, 2012 01:51PM
1799
June 25, 2012 10:16AM
1651
June 26, 2012 08:14AM
1750
June 26, 2012 08:46AM
1636
June 27, 2012 08:36AM
1731
June 27, 2012 09:03AM
1594
June 28, 2012 11:19PM
Re: Backup and trimming data idea
1546
June 29, 2012 07:12AM
1551
June 30, 2012 11:50AM
1628
July 02, 2012 09:47AM
1568
July 03, 2012 01:32PM
1615
July 05, 2012 11:13AM
1785
July 06, 2012 09:57AM
1576
July 07, 2012 10:50AM
1596
July 08, 2012 09:33AM
1588
July 16, 2012 08:08PM
1564
July 21, 2012 10:57PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.