| От | Bruno Wolff III |
|---|---|
| Тема | Re: need some help with a delete statement |
| Дата | |
| Msg-id | 20030628000328.GB21761@wolff.to обсуждение исходный текст |
| Ответ на | need some help with a delete statement (Matthew Hixson <hixson@poindextrose.org>) |
| Список | pgsql-sql |
On Fri, Jun 27, 2003 at 16:09:31 -0700, Matthew Hixson <hixson@poindextrose.org> wrote: > Hi, I have a bunch of records that I need to delete from our database. > These records represent shopping carts for visitors to our website. > The shopping carts I'd like to delete are the ones without anything in > them. Here is the schema: IN is slow in 7.3.3 and below. It will be substantially faster in 7.4. In the meantime rewriting your query to use not exists will probably speed things up for you. Delete also allows for joins with other tables which doesn't help in thsi particular case (at least not any way I can think of), but is help for deleting items there are in (as opposed to are not in) another table.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера