Free 1Z0-909 sample questions
Real questions from the OCP MySQL 8.0 Database Developer practice bank, with the correct answer and an explanation for each one. No junk, no filler.
Try them in the simulator Same questions, with study, timed and flashcard modes.
Showing 10 of 20 free sample questions.
You are tasked with optimizing a slow query that retrieves user information. The `EXPLAIN` output shows that a full table scan is performed on the `users` table despite an index existing on the `email` column. The query is: `SELECT user_id, name FROM users WHERE YEAR(created_at) = 2023 AND SUBSTRING(email, INSTR(email, '@') + 1) = 'example.com';`. What is the primary reason the index on `email` is not being used?
A developer needs to create a stored procedure that accepts an employee ID and returns their department name and manager's name. Which parameter modes should be used for the department name and manager's name? (Select TWO)
True or False: In MySQL 8.0, using the `JSON_TABLE()` function, you can project a JSON document into a relational table format within a single query, which can then be joined with other standard relational tables.
An e-commerce company, "GlobalCart," is migrating its product catalog to a MySQL 8.0 database. The catalog data for each product is semi-structured and received from various suppliers as JSON documents. A key requirement is to allow flexible schema changes without database migrations, while also supporting high-performance filtering on specific attributes like `price` and `brand_id` which are nested deep within the JSON. The development team is also building a new set of microservices that will interact with this data using modern, fluent APIs rather than raw SQL strings. The current table is defined as `CREATE TABLE products (id INT PRIMARY KEY, doc JSON);`. Initial performance tests show that queries filtering on price, such as `SELECT * FROM products WHERE JSON_EXTRACT(doc, '$.details.price') < 50;`, are very slow because they require a full table scan and JSON parsing for every row. Which solution best meets GlobalCart's requirements for schema flexibility, query performance, and modern API access?
A developer needs to connect a new Python application to a MySQL 8.0 database. The requirements are to use an official, pure Python driver that supports the new X Protocol for Document Store access. Which connector should be chosen?
You need to design a view that summarizes customer order totals. The view should prevent any direct `INSERT` or `UPDATE` operations that would result in a customer having a negative total order value. How can this constraint be enforced through the view definition?
A batch import process is inserting millions of rows into an InnoDB table within a single transaction. The process is consuming excessive memory and UNDO log space, occasionally causing the server to run out of resources. Which TWO actions can mitigate this issue without sacrificing the all-or-nothing nature of the import? (Select TWO)
A developer is writing a prepared statement in a Java application to prevent SQL injection. The query needs to fetch a user by their integer ID. What is the correct placeholder to use in the SQL string for the prepared statement?
A table stores geographic locations of retail stores using a `POINT` data type. A query is needed to find all stores within a 10-kilometer radius of a given coordinate. Which function is best suited for this calculation?
10 more free samples are waiting
Create a free account to unlock the whole 1Z0-909 sample bank, or get full access to all 200 practice questions in the simulator.