From: | thilo <thilo(dot)tanner(at)gmail(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Slow Bulk Delete |
Date: | 2010-05-09 21:26:28 |
Message-ID: | a79c1af7-8ef3-4d9a-9341-c9ff7299dd4a@b18g2000yqb.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hi Andy!
Thanks a lot for your hints!
Indeed the problem was on my side. Some Hibernate tuning solved the
problem (and I was able to speedup the query using IN). The real
problem was that Hibernate using unprepared queries if you create a
native query, but prepares the query if you use JP-QL (very odd
behavior). Thanks anyway for your help!
Kind regards
Thilo
> I am going to guess the slow part is sending 1M different queries back and forth from client to server. You could try batching them together:
>
> DELETE FROM table1 WHERE table2_id in (11242939, 1,2,3,4,5...., 42);
>
> Also are you preparing the query?
>
> -Andy
>
> --
> Sent via pgsql-performance mailing list (pgsql-performa(dot)(dot)(dot)(at)postgresql(dot)org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-performance
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2010-05-10 02:39:24 | Re: Dell Perc HX00 RAID controllers: What's inside? |
Previous Message | Greg Smith | 2010-05-09 21:20:28 | Re: Dell Perc HX00 RAID controllers: What's inside? |