Please help me pick up a best possible answer for the following Quiz? Thank you.
ID: 3753891 • Letter: P
Question
Please help me pick up a best possible answer for the following Quiz? Thank you.
Question 1 (1 point)
A query to list the indexes in a MySQL schema that have never been used could be:
a
select * from performance_schema.table_io_waits_summary_by_index_usage
where object_schema = 'your_schema'
and count_star = 0
b
select * from performance_schema.table_io_waits_summary_by_index_usage
where object_schema = 'your_schema'
c
select * from performance_schema.table_io_waits_summary_by_index_usage
where object_schema = 'your_schema'
and count_star > 0
d
select * from performance_schema.table_io_waits_summary_by_index_usage
where object_schema = 'your_schema'
and count_star = True
Question 2 (1 point)
A query to match news stories about hurricanes but not those that mention Hurricane Irma could be:
a
SELECT headline, story FROM news
WHERE MATCH (headline, story)
AGAINST ('+Hurricane +Irma' IN BOOLEAN MODE);
b
SELECT headline, story
WHERE MATCH (headline, story)
AGAINST ('+Hurricane -Irma' IN BOOLEAN MODE);
c
SELECT headline, story FROM news
WHERE MATCH (headline, story)
AGAINST (+Hurricane -Irma IN BOOLEAN MODE);
d
SELECT headline, story FROM news
WHERE MATCH (headline, story)
AGAINST ('+Hurricane -Irma' IN BOOLEAN MODE);
Question 3 (1 point)
A query to get the number of indexes as well as the index names of each table in a specified database could be:
a
SELECT
DISTINCT t.*
FROM
INFORMATION_SCHEMA.STATISTICS s
LEFT OUTER JOIN
INFORMATION_SCHEMA.TABLE_CONSTRAINTS t
ON
t.TABLE_SCHEMA = s.TABLE_SCHEMA
AND
t.TABLE_NAME = s.TABLE_NAME
AND
s.INDEX_NAME = t.CONSTRAINT_NAME
WHERE
0 = 0
AND
t.CONSTRAINT_NAME IS NULL
AND
s.TABLE_SCHEMA = 'YOUR_SCHEMA_SAMPLE';
b
SELECT
DISTINCT s.*
FROM
INFORMATION_SCHEMA.STATISTICS s
LEFT OUTER JOIN
INFORMATION_SCHEMA.TABLE_CONSTRAINTS t
ON
t.TABLE_SCHEMA = s.TABLE_SCHEMA
AND
t.TABLE_NAME = s.TABLE_NAME
AND
s.INDEX_NAME = t.CONSTRAINT_NAME
WHERE
0 = 0
AND
t.CONSTRAINT_NAME IS NULL
AND
s.TABLE_SCHEMA = 'YOUR_SCHEMA_SAMPLE';
c
SELECT
DISTINCT s.*
FROM
INFORMATION_SCHEMA.STATISTICS s
LEFT OUTER JOIN
INFORMATION_SCHEMA.TABLE_CONSTRAINTS t
ON
t.TABLE_SCHEMA = s.TABLE_SCHEMA
AND
t.TABLE_NAME = s.TABLE_NAME
AND
s.INDEX_NAME = t.CONSTRAINT_NAME
WHERE
0 = 0
AND
s.TABLE_SCHEMA = 'YOUR_SCHEMA_SAMPLE';
d
SELECT
DISTINCT s.*
FROM
INFORMATION_SCHEMA.STATISTICS s
LEFT OUTER JOIN
INFORMATION_SCHEMA.TABLE_CONSTRAINTS t
ON
t.TABLE_SCHEMA = s.TABLE_SCHEMA
AND
t.TABLE_NAME = s.TABLE_NAME
AND
s.INDEX_NAME = t.CONSTRAINT_NAME
WHERE
0 = 0
AND
t.CONSTRAINT_NAME IS NULL;
Question 4 (1 point)
You write a Perl script that prints out to the console a number of SQL commands. How do you redirect the console output to the MySQL database engine?
a
perl
b
perl
c
perl
d
echo
Question 5 (1 point)
When table fuinfo is initially loaded with 10 million records, the email addresses were not included. You were recently supplied those email addresses and now you need to update those records. What should you do before updating those records?
Questions 12 - 14 are based on the following table definition:
CREATE TABLE fuinfo
(
fid int(10) unsigned NOT NULL,
name varchar(40) NOT NULL,
email varchar(128) NOT NULL,
UNIQUE KEY email (email),
UNIQUE KEY fid (fid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
a
alter table fuinfo drop index email;
b
drop index email on fuinfo;
c
Both a and b
d
Neither a nor b
Question 6 (1 point)
After you have updated the email addresses, what should you do?
Questions 12 - 14 are based on the following table definition:
CREATE TABLE fuinfo
(
fid int(10) unsigned NOT NULL,
name varchar(40) NOT NULL,
email varchar(128) NOT NULL,
UNIQUE KEY email (email),
UNIQUE KEY fid (fid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
a
DESCRIBE fuinfo;
b
CREATE UNIQUE INDEX email ON fuinfo(email);
c
TRUNCATE fuinfo;
d
SELECT * from fuinfo;
Question 7 (1 point)
a
ALTER TABLE products
ADD KEY(productline);
b
ALTER TABLE productlines
ADD FULLTEXT(productline);
c
ALTER TABLE products
ADD FULLTEXT(productline);
d
ALTER TABLE products
INSERT FULLTEXT(productline);
Question 8 (1 point)
Which command can be used to show that an index has been removed on table fuinfo?
Questions 12 - 14 are based on the following table definition:
CREATE TABLE fuinfo
(
fid int(10) unsigned NOT NULL,
name varchar(40) NOT NULL,
email varchar(128) NOT NULL,
UNIQUE KEY email (email),
UNIQUE KEY fid (fid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
a
DESCRIBE fuinfo;
b
EXPLAIN fuinfo;
c
SELECT * from fuinfo;
d
SHOW fuinfo;
Question 9 (1 point)
What are indexes in a database?
a
Indexes are locations of tables within a database.
b
Indexes are the quick references for fast data retrieval of data from a database.
c
Indexes are the slow references for fast data retrieval of data from a database.
d
Indexes are the quick references for fast data inserts of data.
Question 10 (1 point)
A query to find how often an index of a MySQL table was used could be:
a
select * from performance_schema.table_io_waits_summary_by_index_usage
where object_schema = 'your_schema'
b
drop object_schema = 'your_schema'
c
select * from ‘your_table’
d
select last from performance_schema.table_io_waits_summary_by_index_usage
a
select * from performance_schema.table_io_waits_summary_by_index_usage
where object_schema = 'your_schema'
and count_star = 0
b
select * from performance_schema.table_io_waits_summary_by_index_usage
where object_schema = 'your_schema'
c
select * from performance_schema.table_io_waits_summary_by_index_usage
where object_schema = 'your_schema'
and count_star > 0
d
select * from performance_schema.table_io_waits_summary_by_index_usage
where object_schema = 'your_schema'
and count_star = True
Explanation / Answer
Answer)
1) a)
select * from performance_schema.table_io_waits_summary_by_index_usage
where object_schema = 'your_schema'
and count_star = 0
2)
c)
SELECT headline, story FROM news
WHERE MATCH (headline, story)
AGAINST (+Hurricane -Irma IN BOOLEAN MODE);
Please note as per Chegg Policy, a minimum of 1 question can be answered.We did 2
Hope this answer helps. :)
Hit like if find this answer useful. Thanks