Skip to content

Instantly share code, notes, and snippets.

---------------------------------------------------------------
user join t1, fts1:
QUERY PLAN
|--SCAN fts1 VIRTUAL TABLE INDEX 32:M6
|--SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?)
`--SEARCH u USING INTEGER PRIMARY KEY (rowid=?)
real 0m0,225s
user 0m0,212s
@swvitaliy
swvitaliy / results.txt
Created October 28, 2021 18:43
Generates rows with tokens 'bbb aaa' in 1/10 rows + int columns and explain queries with and w/o join.
---------------------------------------------------------------
join t1:
QUERY PLAN
|--SCAN fts1 VIRTUAL TABLE INDEX 32:M5
`--SEARCH t1 USING INTEGER PRIMARY KEY (rowid=?)
real 0m0,178s
user 0m0,170s
sys 0m0,009s
@swvitaliy
swvitaliy / results.txt
Last active October 28, 2021 17:51
Check if fts has huge matching and another index has a tiny selection.
---------------------------------------------------------------
ic1 (fts indexed with index int column):
QUERY PLAN
`--SCAN fts1 VIRTUAL TABLE INDEX 0:
real 0m0,245s
user 0m0,229s
sys 0m0,016s
---------------------------------------------------------------
set ignorecase
set smartcase
set scrolloff=3 " 3 lines above/below cursor when scrolling
" Emulated Plugins
set surround
" Copy to system clipboard as well
set clipboard+=unnamed
#include<iostream>
#include<vector>
using namespace std;
typedef vector<int> VI;
int ordered_partitons(int n, VI& ni) {
int res = 0;
for (int i : ni) {
#!/bin/bash
(
echo '# Changes'
echo ''
git log --first-parent --pretty=format:'%s' \
| grep -v '^update changelog' \
| perl -p -e 's/^((v?[0-9]+\.?)+)$/\n## \1\n/g' \
| perl -p -e 's/^([^#\s].*)$/* \1/g'
)> CHANGELOG.md
/*
Check max_free index consistency.
Run command for check:
NODE_ENV=mis_integration node test/bin/max_free_check.js b 4000000004017 > /tmp/max_free_check.log
GREP errors:
grep 'wrong max_free' /tmp/max_free_check.log
Check in common logs what happens:
grep 5ac3202fca16773b555b1823 /var/www/.forever/mis_medexis_sched_4017.log | grep -v raw | grep crac-vectors | grep 9124348
"use strict";
var Q = require('q');
var waitForA = null;
var waitForB = null;
function _a() {
if (waitForA) return waitForA;
console.info('call a');
docker rmi -f $(docker images | grep none | awk ' { print $3 } ')
@swvitaliy
swvitaliy / designer.html
Last active August 29, 2015 14:09
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">