Re: Postgres delete performance problem

From: Vitalii Tymchyshyn <tivv00(at)gmail(dot)com>
To: dankogan <dan(at)iqtell(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Postgres delete performance problem
Date: 2013-01-04 18:05:28
Message-ID: CABWW-d1kp9AVovSE-6yVCbpNLO0Rt_U2mW6ZCnzYUSCCtP3mpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Yes, the issue was resolved by the method I proposed. You need to specify
correct type either on java-side or server-side (query text).
See my explanation (it seems it got out of the list):

The driver does not parse your query, so it simply passes everything to
server.
Server use widening conversion, so "bigint=number" becomes
"bigint::number=number", not "bigint=number::bigint" and index can't be
used when any function is applied to indexed field.
Note, that server can't do "bigint=number::bigint" because it does not know
the numbers you will pass.
Consider examples:
1) 0 = 123456789012345678901234567890
2) 0 = 0.4
Correct value is false, but "bigint=number::bigint" will give you
"overflow" error for the first example and true for the second, which is
incorrect.

2013/1/4 dankogan <dan(at)iqtell(dot)com>

> Hello,
>
> Just wondering whether you were able to resolve this issue.
> We are experiencing a very similar issue with deletes using Postgrs 9.0.5
> on
> Ubuntu 12.04.
>
> Dan
>
>
>
> --
> View this message in context:
> http://postgresql.1045698.n5.nabble.com/Postgres-delete-performance-problem-tp5714153p5738765.html
> Sent from the PostgreSQL - performance mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>

--
Best regards,
Vitalii Tymchyshyn

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Claudio Freire 2013-01-04 19:04:00 Re: Re[2]: [PERFORM] SMP on a heavy loaded database
Previous Message dankogan 2013-01-04 17:49:59 Re: Postgres delete performance problem