On Fri, Nov 13, 2015 at 7:15 AM, Merlin Moncure wrote:
> On Thu, Nov 12, 2015 at 4:26 PM, Tom Lane wrote:
>> Merlin Moncure writes:
>>> On Thu, Nov 12, 2015 at 9:48 AM, Craig James wrote:
What about a warning on creation?
db=> create table foo(i integer primary key);
db=> cr
On Thu, Nov 12, 2015 at 4:26 PM, Tom Lane wrote:
> Merlin Moncure writes:
>> On Thu, Nov 12, 2015 at 9:48 AM, Craig James wrote:
>>> What about a warning on creation?
>>>
>>> db=> create table foo(i integer primary key);
>>> db=> create table bar(j integer primary key, i integer);
>>> db=> alter
Merlin Moncure writes:
> On Thu, Nov 12, 2015 at 9:48 AM, Craig James wrote:
>> What about a warning on creation?
>>
>> db=> create table foo(i integer primary key);
>> db=> create table bar(j integer primary key, i integer);
>> db=> alter table bar add constraint fk_bar foreign key(i) reference
On Thu, Nov 12, 2015 at 9:48 AM, Craig James wrote:
>
> On Thu, Nov 12, 2015 at 7:12 AM, Merlin Moncure wrote:
>>
>> On Wed, Nov 11, 2015 at 1:33 PM, Tom Lane wrote:
>> > Massalin Yerzhan writes:
>> >> I'm having an issue. The query never ends:
>> >> delete from bb_gamelist_league;
>> >
>> > 9
On Thu, Nov 12, 2015 at 7:12 AM, Merlin Moncure wrote:
> On Wed, Nov 11, 2015 at 1:33 PM, Tom Lane wrote:
> > Massalin Yerzhan writes:
> >> I'm having an issue. The query never ends:
> >> delete from bb_gamelist_league;
> >
> > 9 times out of 10, the answer to this type of problem is that you h
Merlin Moncure writes:
> On Wed, Nov 11, 2015 at 1:33 PM, Tom Lane wrote:
>> If you're not sure which table is the problem, try doing an EXPLAIN
>> ANALYZE of a DELETE that will only remove a few rows. You should
>> see some time blamed on a trigger associated with the FK constraint.
> You've a
On Wed, Nov 11, 2015 at 1:33 PM, Tom Lane wrote:
> Massalin Yerzhan writes:
>> I'm having an issue. The query never ends:
>> delete from bb_gamelist_league;
>
> 9 times out of 10, the answer to this type of problem is that you have
> some table referencing this one by a foreign key, and the refer
Massalin Yerzhan writes:
> I'm having an issue. The query never ends:
> delete from bb_gamelist_league;
9 times out of 10, the answer to this type of problem is that you have
some table referencing this one by a foreign key, and the referencing
column is not indexed. PG doesn't require such an i
Postgresql version 9.4.4.
I'm having an issue. The query never ends:
delete from bb_gamelist_league;
No WHERE clause used. There are approx. 227000 rows in that table.
Here is the table itself:
CREATE TABLE bb_gamelist_league (
id SERIAL NOT NULL ,
bb_league_id INTEGER NOT NULL ,
day_nu