-
In how many different ways can the letters of the word 'LEADING' be arranged in such a way that the vowels always come together?
-
How many words can be formed by using letters of the word ‘DELHI’?
-
From a group of 7 men and 6 women, five persons are to be selected to form a committee so that at least 3 men are there on the committee. In how many ways can it be done?
-
In how many different ways can the letters of the word 'CORPORATION' be arranged so that the vowels always come together?
-
Find the number of ways the letters of the word ‘RUBBER can be arranged?
-
Find in how many different ways, the letters of the word ‘LEADING’ can be arranged in such way that the vowels always come together?
-
Out of 5 consonants and 4 vowels, how many words of 3 consonants and 2 vowels can be formed?
-
A bag contains 2 white marbles, 3 black marbles and 4 red marbles. Find in how many ways, 3 marbles can be drawn, so that at least one black marble is included in each draw?
-
In how many ways can the letters of the word 'LEADER' be arranged?
-
Out of 7 consonants and 4 vowels, how many words of 3 consonants and 2 vowels can be formed?
-
In a group of 6 boys and 4 girls, four children are to be selected. In how many different ways can they be selected such that at least one boy should be there?
-
How many combinations are possible while selecting four letters from the word ‘SMOKEJACK’ with the condition that ‘J’ must appear in it?
-
There are 30 people in a group. If all shake hands with one another , how many handshakes are possible?
-
On a railway line there are 20 stops. A ticket is needed to travel between any 2 stops. How many different tickets would the government need to prepare to cater to all possibilities?
-
Mayur travels from Mumbai to Jammu in 7 different ways. But he is allowed to return to Mumbai by any way except the one he used earlier. In how many ways can he complete his journey?
-
If Suraj doesn’t want three vowels together, then in how many, can he arrange letters of the word 'MARKER'?
-
There are 35 people in a group. There are 12 school girls, 10 school boys, 5 senior citizens and 8 babies in the group. The organizer of the group wants to select a school girl or a school boy as leader of the group. In how many ways can he do so?
-
There are 30 people in a party. If everyone is to shake hands with one another, how many hand shakes are possible?
-
A box contains 2 white, 3 black and 5 red balls. In how many ways can three balls be drawn from the box if at least one black ball is to be included in the draw?
-
A person can go from place “P” to “Q” by 7 different modes of transport, but is allowed to return back to “P” by any mode other than the one used earlier. In how many different ways can he complete the entire journey?
-
In how many different ways can the letters of the word ‘GEOMETRY’ be arranged so that the vowels always come together?
-
In how many ways can the letters of the word INDIA be arranged, such that all vowels are never together?
-
In Cricket League, in first round every team plays a match with every other team. 9 teams participated in the Cricket league. How many matches were played in the first round?
-
In Daya’s bag there are 3 books of History, 4 books of Science and 2 books of Maths. In how many ways can Daya arrange the books so that all the books of same subject are together?
-
A trekking group is to be formed having 6 members. They are to be selected from 3 girls, 4 boys and 5 teachers. In how many ways can the group be formed so that there are 3 teachers and 3 boys or 2 girls and 4 teachers?
-
In a class, there are 15 students. During a Christmas party all of them shook hands with each other only once. How many handshakes took place in the class?
-
A box contains 4 black, 3 red and 6 green marbles. 2 marbles are drawn from the box at random. What is the probability that both the marbles are of the same color?
-
How many words can be formed by using all letters of word ALIVE.
-
In how many ways can the letters of the word ENCYCLOPAEDIA be arranged such that vowels only occupy the even positions?
-
A locker in bank has 3 digit lock. Mahesh forgot his password and was trying all possible combinations. He took 6 seconds for each try. The problem was that each digit can be from 0 to 9. How much time will be needed to by Mahesh to try all the combinations?
-
A bank has 6 digit account number with no repetition of digits within a account number. The first and last digit of the account numbers is fixed to be 4 and 7. How many such account numbers are possible?
-
4 members form a group out of total 8 members.
(i) In how many ways it is possible to make the group if two particular members must be included.
(ii) In how many ways it is possible to make the group if two particular members must not be included?
-
A briefcase has a number-lock system containing a combination of 3 digits (Each digit can be of numbers 0 to 8). If the correct combination is unknown, how much maximum time would be required to open the bag if each “trial” of combination takes 3 seconds?
-
In a group containing 6 cows and 4 buffalos, 4 livestock are to be selected in such a way that at least 1 cow should always be present. How many way of doing that are possible?
-
In a room there are 2 green chairs, 3 yellow chairs and 4 blue chairs. In how many ways can Raj choose 3 chairs so that at least one yellow chair is included?
-
There are 8 routes from London to Delhi. And there are 6 routes from Delhi to Tokyo. In how many different ways can Raj travel from London to Tokyo via Delhi?
-
How many 3-letter words can be formed out of the letters of the word ‘CORPORATION’, if repetition of letters is not allowed?
-
In how many ways can we arrange the word ‘FUZZTONE’ so that all the vowels come together?
-
On a shelf, 2 books of Geology, 2 books of Sociology and 5 of Economics are to be arranged in such a way that the books of any subject are to be together. Find in how many ways can this be done?
-
Without repetition, using digits 2, 3, 4, 5, 6, 8 and 0, how many numbers can be made which lie between 500 and 1000?
Permutation and Combination problems, Example and Formula
MySQL Explain Query and Execution Plan Example
EXPLAIN in MySql is one of the strongest feature tool through which we can analyze and optimize the Query and we can rewrite in a cost efficient and resource Optimized way which can execute faster.
Basically EXPLAIN will give you the information about the Query Execution Plan which is used. Means it will give the information about the way through which Database execute Query. It can be used in front of SELECT, INSERT, UPDATE, DELETE and REPLACE. It is a feature tool through which we can find the Quick remedy for Slow Query.
If your MySql EXPLAIN Query is not working or not Parsing correctly then you can type SHOW WARNINGS into your editor and run it.
Basically EXPLAIN will give you the information about the Query Execution Plan which is used. Means it will give the information about the way through which Database execute Query. It can be used in front of SELECT, INSERT, UPDATE, DELETE and REPLACE. It is a feature tool through which we can find the Quick remedy for Slow Query.
If your MySql EXPLAIN Query is not working or not Parsing correctly then you can type SHOW WARNINGS into your editor and run it.
Use EXPLAIN to Improve Query Performance
Prameter |
Purpose |
id |
SQL Query id |
select_type |
Type of SQL Statement |
table |
Referenced Table |
type |
Type of Join (It defined how the table will be accessed or joined) |
possible_keys |
Possible
key which can be used in the Query |
key | Key which is used in the Query |
key_len |
Used Key length in
the Query |
ref | Columns
which got compared to indexes |
rows | Numbe
of rows scanned during query execution |
Extra | Additional
Information about Query |
Consider the below Query (We have studentDetails Table which have millions of record in it ) :
EXPLAIN SELECT * FROM `studentDetails`
id | 1 |
select_type | SIMPLE |
table | studentDetails |
type | ALL |
possible_keys | (NULL) |
key | (NULL) |
key_len | (NULL) |
ref | (NULL) |
rows | 40846 |
Extra |
Above will be the output of the Query which we tried Executing using EXPLAIN. Usually EXPLAIN will give you lot of information regarding your query like which key are used, Indexing is used or not, how many rows are getting scanned while executing query, what are all the possible keys we can use in query etc.. We will study the above in detail below.
select_type ( Type of SQL Statement ) : Possible value which can come based on the Query is below
- SIMPLE
- PRIMARY, DERIVED
- SUBQUERY
- DEPENDENT SUBQUERY
- UNCACHEABLE SUBQUERY
- UNION
- DEPENDENT UNION
- UNION RESULT
Most important point to look in the EXPLAIN Query output is type and rows. Row gives you the information about how many rows are scanned before the query output. Type define how the table will be access or joined. We will see EXPLAIN Query type in detail below.
- system : The table contain one or Zero rows.
- const : It is fastest type of join. It will have only one matching rows which will be indexed. It is fastest because table is scanned once and the column is treated as constant while joining other table.
- eq_ref : In this Index (Primary or Unique NOT NULL) will be used by the join and it is the best table join type. One rows will read from the table and compared with rows from the previous table.
- ref
- fulltext : This join will use FULLTEXT index for processing the query.
- ref_or_null
- index_merge
- unique_subquery
- range : Only rows belong to some particular or specified range get scanned for the query output. DB indexing is used to select or find the matching rows.
- index : In this all Index Tree will be scanned to find the exact matched query condition.
- all : Entire Table row and its combination will be scanned to find the matched query condition output.
EXPLAIN SELECT * FROM users WHERE id >60000 AND id < 60002
Prameter | Value |
id | 1 |
select_type | SIMPLE |
table | users |
type | range |
possible_keys | id,registered_user,id_attyp |
key | id |
key_len | 4 |
ref | (NULL) |
rows | 1 |
Extra | Using where |
Subscribe to:
Posts (Atom)
Our Feature Post
There is a tree between houses of A and B If the tree leans on As House
There is a tree between houses of A and B. If the tree There is a tree between houses of A and B. If the tree leans on A’s House, the t...

Our Popular Post
-
👉 Reema can complete a piece of work in 12 days while Seema can the same work in 18 days. If they both work together, then how many da...
-
Probability Question and Solutions Two dice are thrown simultaneously. What is the probability of getting two numbers whose product...
-
The average of 11 numbers is 30. If the | Solutions The average of 11 numbers is 30 . If the average of first six numbers is...
-
Karan, Hari and Kowshik play cricket. The runs got by Karan to Hari and Hari to Kowshik are in the ratio of 5:3. They get altogether 588 ...
-
Analogies Questions :: Logical Reasoning 👉 Analogies shortcut tricks, Formula, Method and Notes 👉 Analogies Questions and a...