Сообщения

Сообщения за ноябрь, 2017

Optimization of sum in PostgreSQL

Consider this situation: a statistical table and column identifiers and column counters. You want to sum the counters for a certain subset. In this case we are not interested in how we choose our lot — about indexes and protezirovanie written many books and articles. We assume that all the data already selected the most optimal way and learn how to quickly summarize . This is not the first place that should be optimized, if the query is slow, probably the latter. The following ideas are meaningful to apply when the execution plan (explain) has mean perfect and it the mosquito nose will not undermine, but I want to "squeeze" a little more. Will make a test table and write in it 10 million records: the create table s ( d date, browser_id int not null, banner_id int not null, views bigint, clicks bigint, primary key(d, browser_id, banner_id) ); insert into s select d, browser_id, banner_id, succ + insucc, succ from ( select d, browser_id, banner_id, (array[0,0,50,5

I opened a business account in USA

in the Summer of 2011 I came to the States and opened an account at Chase Bank as a private person. It took me about 30 minutes. If someone is interesting, write, I will try to find time to describe in detail what you need to bring to the USA to 30 minutes to open a Bank account. About a month ago I registered ATILEKT, Inc . in the state of Delaware and thought to open a business account as easily. But, as you can guess, I was wrong. Come to the Bank where I opened an individual account, give all the documents confirming the registration of the company. And in response to hear, and where a work permit in California? The fact is that in Delaware the most well written laws for the registration of corporations, so most of Inc registered there. Then to work in another state, you need to send a request to goverment California and to 5 weeks after resolution. I, of course, answer was and I just showed the questionnaire with the request that I filled and are going to s

Beta.

Изображение
Those fortunate karma greater than 10, I can already see (as well as beta testing) that will provide Marvelous Habr . / > Log on to http://beta.habr.ru/ Rounded: Yay, buttons! and It pulls! don't forget where you publish the topic: Finally, a hint: in All frames! go see who won: However: Alignment in the center! Without glitches has not done: But what about this there writes Mio Mio: It's beta time! Today we are launching a test platform on which to present their new developments. Be located this site will always be here for beta.habr.ru however, it will not be available always, but only on "holidays". In the case of the introduction of any complicated options structure Habra we will sharpen them for Bethabra. (Betacap runs on a separate database, so all posts, comments, voting for the karma, etc., that You are going to do, will not affect the main content Habra. As You can see

Search yesterday, today, tomorrow...

If I may start without the introduction and background. Search engine today (including first and foremost, a web browser) is a software program which is based on the mathematical apparatus of statistical, probabilistic and other methods. In any case, he said. Considers links, considers the relevance of the statistics of transitions that takes into account many factors (location, age, etc., different situational information). This ultimately leads to a narrowing of results and the filtering issue. And that ultimately there is a huge, multi-level course and today is fundamentally quite a complex index to a database collected on the Internet information. In this case, the database information is also quite sophisticated, layered structure, which is understandable today, but does not change the fact. Here, of course, and caches, redundancy and parallelization, and the other, other, other, that provides each of us the opportunity to use, from my point of view, a very important resourc

Hall of fame

Изображение
Top with avatars and comment it suggested the idea of creating a Board of honor. Don't even know where to post — here or in the "Ideas for website", there would be a possibility — would do krosspost. How well it turned out — to judge you. Small Board, with young autarchically: <a href="htt Article based on information from habrahabr.ru