Skip to content

Instantly share code, notes, and snippets.

create table foo(bar integer not null, baz integer not null, qux text);
insert into foo(bar, baz, qux) select random()*10, random()*10, 'some much much much much much much much longer random text '||g from generate_series(1,10000) g;
create index bar_baz on foo(bar, baz);
postgres=> explain (buffers, analyze, verbose) select max(qux) from foo where bar>-1000 and baz=0;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=120.64..120.65 rows=1 width=32) (actual time=3.051..3.051 rows=1 loops=1)
@jackdouglas
jackdouglas / gist:1485246
Created December 16, 2011 09:10
Performance hit of a check constraint in Postgres
begin;
set role dba;
create role stack;
grant stack to dba;
create schema authorization stack;
set role stack;
--
create table foo(id integer check (id>0));
create table bar(id integer);
\timing on
set role dba;
create role stack;
grant stack to dba;
create schema authorization stack;
set role stack;
--
create table film(film_id integer primary key, release_year integer not null);
create table film_actor(actor_id integer, film_id integer references film, primary key (actor_id, film_id));
insert into film(film_id, release_year) values(1,2004);
begin;
If the Documentary Hypothesis is to be believed (and I find some pretty severe holes in the hypothesis), then future revisers could have potentially smoothed out the rough grammar, but given the position that Moses held throughout Jewish history, it seems odd that they would smooth his writing, but keep his speech such as it is in its present state. swasheck apr 4 at 14:55
@swasheck: Moses is not the author of Pentateuch, the documentary hypothesis is correct, and J,E,P,D _made Moses up_ to teach people about God. There are no holes in the hypothesis, and it is unlikely that there were previous documents, other than some terse Geneologies, used by J and E. I think J wrote this in an actual immitation of a Hebrew foreign accent, so as to make it sound like dialog with a non-native or awkward speaker, like Borat. Ron Maimon apr 4 at 17:16
@swasheck, I also disagree with the documentary hypothesis, but I do acknowledge later editors and copyists. Could it be that the editors smoothened the prose but preser
There have been a lot of discussions on meta about different aspects of site direction,
but none directly focused on the fundamental question: "What kind of site do we
want to have?"
This question is fundamentally about ***where do we want to be in the end***, and not about
*how we get there*.
***We all agree that contributions must 'show their work'. Exactly where and how we draw
the line is an implementation detail and outside the scope of this question.***
**Avoid truth assertions**
We want the site to focus on questions about the text and the process of interpreting that.
This relies on (at least) grammar, linguistics, history, archaeology, and comparison
with other text. None of that is inherently religious, and that non-dependence on a
religious foundation is what distinguishes BH from other sites in the SE network.
Because we are focused on the text and the process, not on religious application,
assertions of religious truth ("dogma") are not helpful in answers: they can't be
examined, proven or disproven, or dug into the same way that other factors cna be.
**Bring your own framework**
We want a site that allows contributors to speak from within their framework. Overall,
this broadens the appeal of the site, and it preserves the richness of expression when
answers are given in the natural context of the one giving the answer.
Our aim is to be 'expert' in the context of the internet. This will not be the best
home for those who do not think deeply about the texts or those who cannot communicate
clearly and effectively. It is not our aim to be home only to academics or full-time
theologians: that would narrow the user-base too far and not be sustainable.
**Bring your own framework**
We want a site that allows contributors to speak from within their framework. Overall,
this broadens the appeal of the site, and it preserves the richness of expression when
answers are given in the natural context of the one giving the answer, even if this
means expressing one's framework or opinions as unqualified facts.
Our aim is to be 'expert' in the context of the internet. This will not be the best
home for those who do not think deeply about the texts or those who cannot communicate
clearly and effectively. But it is not our aim to be home only to academics or full-time
**Avoid truth assertions**
We want a site that welcomes people of all perspectives, as our site description says.
This broadens the appeal of the site (though of course we don't want a free-for-all).
This site focuses on the *text* and the
process of interpreting it, using the tools of (at least) grammar, linguistics, history,
archaeology, science, and comparison with other texts. None of that is inherently
religious, and that non-dependence on a religious foundation is what
*distinguishes* BH from other sites in the SE network.
There have been a lot of discussions on meta about different aspects of site direction, but none directly focused on the fundamental question: What kind of site do we want to have? What should our culture be? In particular, what style of answers are we looking for?
This question is fundamentally about **where do we want to be in the end**, and not about *how we get there*.
**We all agree that contributions must 'show their work'. Exactly where and how we draw the line is an implementation detail and outside the scope of this question.**
We've provided answers that capture the main positions we know about. Please feel free to add your own if you have another outcome in mind.
Please up-vote answers you find acceptable, down-vote ones you don't, and abstain if you don't feel strongly either way. Please also up-vote the question no matter which of these you do, so we can gauge participation.