Hello folks,
Thank you very much for analysis and suggested - there is a lot to learn
here. I just tried UNION queries and got following error:
ERROR: FOR UPDATE is not allowed with UNION/INTERSECT/EXCEPT
I made a table dump for anyone who wants to give it a spin
https://app.box.com/s/464b12gl
2017-06-28 10:43 GMT+02:00 Pritam Baral :
>
>
> On Wednesday 28 June 2017 02:00 PM, Ulf Lohbrügge wrote:
> > Nope, I didn't try that yet. But I don't have the impression that
> reindexing the indexes in information_schema will help. The table
> information_schema.tables consists of the following i
On Fri, Jun 23, 2017 at 6:33 PM, Tom Lane wrote:
> Clint Miller writes:
>> That's a good plan because it's not doing a quick sort. Instead, it's just
>> reading the sort order off of the index, which is exactly what I want. (I
>> had to disable enable_sort because I didn't have enough rows of tes
On 2017-06-28, Pavel Stehule wrote ...
> On 2017-06-28, Yevhenii Kurtov wrote ...
>> On 2017-06-28, Pavel Stehule wrote ...
>>> On 2017-06-28, Yevhenii Kurtov wrote ...
We have a query that is run almost each second and it's very important to
squeeze every other ms out of it. The query
- Mensaje original -
> De: "Yevhenii Kurtov"
> Para: pgsql-performance@postgresql.org
> Enviados: Miércoles, 28 de Junio 2017 3:47:44
> Asunto: [PERFORM]
>
> Hello,
>
> We have a query that is run almost each second and it's very important to
> squeeze every other ms out of it. The que
Nope, I didn't try that yet. But I don't have the impression that
reindexing the indexes in information_schema will help. The table
information_schema.tables consists of the following indexes:
"pg_class_oid_index" UNIQUE, btree (oid)
"pg_class_relname_nsp_index" UNIQUE, btree (relname, rel
2017-06-28 9:28 GMT+02:00 Yevhenii Kurtov :
> Hello Pavel,
>
> Can you please give a tip how to rewrite the query with UNION clause? I
> didn't use it at all before actually and afraid that will not get it
> properly from the first time :)
>
SELECT c0."id" FROM "campaign_jobs" AS c0
WHERE (((c0."
Hello Pavel,
Can you please give a tip how to rewrite the query with UNION clause? I
didn't use it at all before actually and afraid that will not get it
properly from the first time :)
On Wed, Jun 28, 2017 at 2:12 PM, Pavel Stehule
wrote:
>
>
> 2017-06-28 8:47 GMT+02:00 Yevhenii Kurtov :
>
>>
2017-06-28 8:47 GMT+02:00 Yevhenii Kurtov :
> Hello,
>
> We have a query that is run almost each second and it's very important to
> squeeze every other ms out of it. The query is:
>
> SELECT c0."id" FROM "campaign_jobs" AS c0
> WHERE (((c0."status" = $1) AND NOT (c0."id" = ANY($2
> OR ((c0."s