View .zshrc
This file contains 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
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
export ZSH="$HOME/.oh-my-zsh" | |
ZSH_THEME="avit" | |
HYPHEN_INSENSITIVE="true" | |
COMPLETION_WAITING_DOTS="true" | |
plugins=(autojump common-aliases docker extract httpie docker docker-compose kubectl) | |
source $ZSH/oh-my-zsh.sh |
View HealthcheckApi.java
This file contains 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
@RestController | |
public class HealthcheckApi { | |
private final SayImAlive sayImAlive; | |
public HealthcheckApi(SayImAlive sayImAlive) { | |
this.sayImAlive = sayImAlive; | |
} | |
@RequestMapping(value = "/healthcheck") |
View script.sh
This file contains 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
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o xtrace | |
# Script goes here... |
View explain_select_with_quotes.sql
This file contains 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
mysql> EXPLAIN SELECT SQL_NO_CACHE * FROM articles WHERE article_id = '150001'; | |
+----+-------------+----------+------------+-------+---------------+---------+---------+-------+------+----------+-------+ | |
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | | |
+----+-------------+----------+------------+-------+---------------+---------+---------+-------+------+----------+-------+ | |
| 1 | SIMPLE | articles | NULL | const | PRIMARY | PRIMARY | 34 | const | 1 | 100.00 | NULL | | |
+----+-------------+----------+------------+-------+---------------+---------+---------+-------+------+----------+-------+ | |
1 row in set, 1 warning (0.00 sec) |
View select_with_quotes.sql
This file contains 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
mysql> SELECT SQL_NO_CACHE * FROM articles WHERE article_id = '150000'; | |
+------------+---------------+-----------------+ | |
| article_id | article_title | article_content | | |
+------------+---------------+-----------------+ | |
| 150000 | Title 150000 | Content 150000 | | |
+------------+---------------+-----------------+ | |
1 row in set (0.00 sec) |
View select_without_quote.sql
This file contains 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
mysql> SELECT SQL_NO_CACHE * FROM articles WHERE article_id = 150000; |
View article.java
This file contains 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
class Article { | |
private Integer article_id; | |
private String article_title; | |
private String article_content; | |
} |
View explain_ignore_index.sql
This file contains 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
mysql> EXPLAIN SELECT SQL_NO_CACHE * FROM articles IGNORE INDEX(PRIMARY) WHERE article_id = 150000; | |
+----+-------------+----------+------------+------+---------------+------+---------+------+--------+----------+-------------+ | |
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra | | |
+----+-------------+----------+------------+------+---------------+------+---------+------+--------+----------+-------------+ | |
| 1 | SIMPLE | articles | NULL | ALL | NULL | NULL | NULL | NULL | 996520 | 10.00 | Using where | | |
+----+-------------+----------+------------+------+---------------+------+---------+------+--------+----------+-------------+ | |
1 row in set, 2 warnings (0.00 sec) |
View ignore_index.sql
This file contains 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
mysql> SELECT SQL_NO_CACHE * FROM articles IGNORE INDEX(PRIMARY) WHERE article_id = 150000; | |
+------------+---------------+-----------------+ | |
| article_id | article_title | article_content | | |
+------------+---------------+-----------------+ | |
| 150000 | Title 150000 | Content 150000 | | |
+------------+---------------+-----------------+ | |
1 row in set, 1 warning (0.65 sec) |
View use_primary.sql
This file contains 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
mysql> SELECT SQL_NO_CACHE * FROM articles USE INDEX(PRIMARY) WHERE article_id = 150000; | |
+------------+---------------+-----------------+ | |
| article_id | article_title | article_content | | |
+------------+---------------+-----------------+ | |
| 150000 | Title 150000 | Content 150000 | | |
+------------+---------------+-----------------+ | |
1 row in set (0.62 sec) |
NewerOlder