This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALTER TABLE customer ADD INDEX (customer_id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String selectByIdAndSession = String.format("select * from customer where customer_id = %s and session = %s", customerId, session); | |
| String selectBySession = String.format("select * from customer where session = %s", session); | |
| if (enableNewQuery) { | |
| return CustomerDao(selectByIdAndSession); | |
| } else { | |
| return CustomerDao(selectBySession); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT * | |
| FROM customer | |
| WHERE session = '0509853c-a14e-4949-a976–3b125797f642'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE customer ( | |
| session varchar(36), | |
| customer_id int, | |
| product_id int, | |
| primary key (session) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALTER TABLE customer DROP PRIMARY KEY, ADD PRIMARY KEY(customer_id, session); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELIMITER $$ | |
| CREATE PROCEDURE insert_data() | |
| BEGIN | |
| DECLARE i INT DEFAULT 0; | |
| WHILE i < 13000000 DO | |
| INSERT INTO customer (session, customer_id, product_id) VALUES | |
| (CONCAT(i+1, '-', '4949-a976-3b125797f641'), i, i), | |
| (CONCAT(i+2, '-', '4949-a976-3b125797f641'), i, i), | |
| (CONCAT(i+3, '-', '4949-a976-3b125797f641'), i, i), | |
| (CONCAT(i+4, '-', '4949-a976-3b125797f641'), i, i), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function processPromiseRejections() { | |
| ... | |
| ... | |
| let len = pendingUnhandledRejections.length; | |
| while (len--) { | |
| const promise = ArrayPrototypeShift(pendingUnhandledRejections); | |
| const promiseInfo = maybeUnhandledPromises.get(promise); | |
| if (promiseInfo === undefined) { | |
| continue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function unhandledRejection(promise, reason) { | |
| ... | |
| const emit = (reason, promise, promiseInfo) => { | |
| try { | |
| ... | |
| return process.emit('unhandledRejection', reason, promise); | |
| } finally { | |
| popAsyncContext(asyncId); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function processTicksAndRejections() { | |
| let tock; | |
| do { | |
| while (tock = queue.shift()) { | |
| ... | |
| try { | |
| const callback = tock.callback; | |
| if (tock.args === undefined) { | |
| callback(); |