Re: Speeding up DELETEs on table with FKs ...

Поиск
Список
Период
Сортировка
От Marc G. Fournier
Тема Re: Speeding up DELETEs on table with FKs ...
Дата
Msg-id 20041011033728.J54093@ganymede.hub.org
обсуждение исходный текст
Ответ на Re: Speeding up DELETEs on table with FKs ...  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Speeding up DELETEs on table with FKs ...  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, 11 Oct 2004, Tom Lane wrote:

> "Marc G. Fournier" <scrappy@postgresql.org> writes:
>> 'k, now that I've seen the error of my ways *groan*  I've gone back
>> through, and checked for what is referencing that table, and there is only
>> one place that is, and it does have an INDEX:
>
>>> explain analyze select * from table where raw_id = 20722;
>>                                                              QUERY PLAN
>>
-----------------------------------------------------------------------------------------------------------------------------------
>>   Index Scan using ind_raw_id on table  (cost=0.00..3.09 rows=1 width=122) (actual time=0.33..0.33 rows=0 loops=1)
>>     Index Cond: (raw_id = 20722::numeric)
>>   Total runtime: 0.37 msec
>
> "numeric", hm?  Is the referenced column also of type numeric?

Correct, and a join of the two tables appears to use both indices, altho 
one is of numeric(9,0) and the other numeric(12,0) ... could that 
difference post a problem from a FK perspective that a SELECT/JOIN 
wouldn't show?

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy@hub.org           Yahoo!: yscrappy              ICQ: 7615664


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: cvs tip broken build for plpython
Следующее
От: Greg Stark
Дата:
Сообщение: Re: OT moving from MS SQL to PostgreSQL