Сообщения

Сообщения за июль, 2015

psql postgres

connect: psql -U username(postgres) -W \l \list all dbs \dt all tables in current db \connect dbname root доступ su - postgrtes psql и create database ...

sql optimizations

Изображение
B-tree is a self-balancing tree that maintains sorted data and allows operation in logarithmic time. B-trees can handle range queries on sorted data (<, ≤, >, ≥, between, in, is null, is not null) B-tree index can also be used for queries that involve pattern matching operator LIKE or ~ if the pattern is a constant and the anchor is at the beginning of the pattern. For example, you can try matching queries column_name LIKE ‘Apple%’ or column_name ~ ‘^Apple’ But, querying ‘%macbook%’ or ‘%pro’ will not be efficient. For such queries, the query planner will resort to full-text sequential search which is not optimized. Enter, GIN indexes. GIN stands for Generalized Inverted Indexes. We can create a GIN index to speed up text searches: CREATE INDEX index_name ON table USING GIN (to_tsvector(‘english’, column_name)); The query above specifies that the English configuration can be used to parse and normalize the strings. And for the part of searching, a simple query to print the tit

SOA распределенная архитектура

http://habrahabr.ru/search/?q=SOA http://habrahabr.ru/search/?q=restful&target_type=posts&order_by=relevance http://m.habrahabr.ru/post/185636/ https://toster.ru/q/164275

crontab ubuntu

http://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job