querysetで複数updateしたいならbulk_updateの方が早いから使うべき

今回はquerysetで複数のデータに対してupdateしたいならbulk_updateの方が早いから使うべきということについてお話ししていきたいと思います。
querysetで複数updateしたいならbulk_updateの ...querysetの存在確認にexists()とcount()はどちらの方が早い?

今回はDjangoのquerysetの存在確認にexists()とcount()はどちらの方が早いのかについて調査した結果について書きたいと思います。
先にネタバレしますが、count()よりもexists()の方がパフォ ...
exists()を使うよりもif querysetの方が実は早い?公式ドキュメントとは逆

今回はDjangoの公式ドキュメントにはexists()を使用した方が「if queryset」を使うよりもパフォーマンスが良いと書かれていますが、調べてみたら逆の結果が出たということについてご紹介いたいます。
動作環境と ...
querysetでlen()よりcount()の方が圧倒的にパフォーマンスが良いから使うべき

今回はDjangoのquerysetでlen()よりcount()の方がパフォーマンスが圧倒的に良いからcount()を使うべきということについてお話しさせていただきます。
querysetでlen()よりcount()の方が圧 ...manage.pyのsqlclearはDjangoのバージョン1.9で消えた

微妙にハマったので記事にします。
python manage.pyのsqlclearはDjangoのバージョン1.9で消えたというお話です。
manage.pyのsqlclearはDjangoのバージョン1.9で消え ...Djangoからsqliteに接続するための二つの方法

今回はDjangoからsqliteに接続するための二つの方法についてご紹介いたします。
ちなみに二つの方法のうちDjangoのデータベースに接続するためには
・コマンドラインで「python manage.py d ...
querysetでbulk_create()とcreate()のパフォーマンス比較

今回はDjangoのquerysetでbulk_create()とcreate()のパフォーマンスを比較した結果について書きたいと思います。
querysetでbulk_create()とcreate()のパフォーマンス比較GASを使いGoogle Spread Sheet上でメニューを作成してメニューから関数を実行させる

今回はGASを使いGoogle Spread Sheet上でメニューを作成してメニューから関数を実行させる方法についてご紹介いたします。
GASを使いGoogle Spread Sheetでメニューを作成してメニューから関数を実 ...querysetでextraを使って新たに定義したものについてorder_byする方法

今回はDjangoのquerysetでextraを使って新たに定義したものについてorder_byする方法についてご紹介いたします。
querysetでextraを使って新たに定義したものについてorder_byする方法最 ...
PythonでString型の文字を分解して五十音順に並び替えするオシャレな方法

今回はPythonでString型の文字を分解して五十音順に並び替えするオシャレな方法についてご紹介いたします。
実務で使う機会は少ないかもしれませんが、プロコンなどの際に覚えておくと役に立つのではないでしょうか。 ...
Djangoのquerysetで逆順で取得したいときにreverse()を使う時の注意点

今回はDjangoのquerysetで逆順で取得したいときにreverse()を使う時の注意点についてご紹介したいと思います。
Djangoのquerysetで逆順で取得したいときにreverse()を使う時の注意点結論と ...
TypeError: exceptions must be old-style classes or derived from BaseException, not NoneTypeの対処法(Python2)

今回はTypeError: exceptions must be old-style classes or derived from BaseException, not NoneTypeはなぜ起きるのかについてご紹介いたします。
ポケモン剣盾のIDくじの確率計算機を作りました(理論値)

ポケモン剣盾のIDくじの確率計算機を作りました。
持っているポケモンのIDの数(厳密にはIDの種類の数)を入力することで当選の確率を表示させることができます。
あくまでも無作為にポケモンのIDを抽出することを想定してい ...
Macで書式なしコピーをする方法

今回はMacで書式なしコピーをする方法について書きたいと思います。
Macを購入してから1年が経とうとしていますが、今更ながら発見したので記事にしたいと思います。
結論として、次の二 ...
Git BashでSourceTreeのようにNetwork Graphを表示させる方法

今回はGit BashでSourceTreeのようにNetwork Graphを表示させる方法についてご紹介いたします。
自らの備忘録の側面が強いです。
Git BashでSourceTreeのようにNetwork ...