On Monday, July 6, 2020, Michael Lewis wrote:
> Did you say you have an index on c1?
> [...]
> I don't know the data, but I assume there may be many rows with the same
> c1 value, so then you would likely benefit from getting that distinct set
> first like below as your FROM table.
>
> Re-readin
On Tue, Jul 7, 2020 at 4:41 AM Robert Inder
wrote:
> So how should I structure my chunks of SQL so that I can have "safe"
> (all-or-nothing) blocks,
> AND use them from within one another?
>
While there are more advanced constructs that may aid here I would suggest
just following two rules:
top
Michael, David thanks for your quick replies.
*@Michael*
I initially dismissed writing this query using joins or subselects because
the real query has about 80 columns and I was afraid that having 80
joins/subselect would cause issues with postgresql including planner that
would fallback to GEQO.
On Tue, 2020-07-07 at 12:40 +0100, Robert Inder wrote:
> NOW, I want to do the same for a BIGGER task.
> BUT I realise that if I create bigger-task.sql like this...
>BEGIN;
> <>
>\i do-something-useful.sql
> <>
>COMMIT;
> ...the COMMIT inside "do-something-useful.sql" closes
I don't think nested commit is supported however you might want to put
logic in do-something-useful.sql into a stored procedure without commit and
your BIGGER task just calls this SP and commits at the end; you can run the
SP by itself to have transaction protected.
/Jason
On Tue, 7 Jul 2020 at 2
I'm an experienced programmer but really new to SQL,
and I'm wanting a pointer to "the SQL way" to structure/organise chunks of
code.
A while back, I wrote a chunk of SQL to Do Something Useful.
I put it in a file (do-something-useful.sql).
And, to protect against getting into a weird state, I wra
The documentation for CREATE PROCEDURE informs us "A|SECURITY
DEFINER|procedure cannot execute transaction control statements (for
example,|COMMIT|and|ROLLBACK|, depending on the language)."
Can anyone let me know why this is so and are there any plans to remove
this restriction in future rele
Hi Team,
I am running Postgres v12.2 and in our testing we are running performance test
for 72 hrs with load. During the run it is working fine till first 16hrs after
that disk utilization getting spike and next 2-4 hrs it is reaching to 100%.
During the run we are deleting 2 million records
-Oprindelig meddelelse-
>Fra: legrand legrand
>Sendt: 6. juli 2020 17:36
>Til: pgsql-gene...@postgresql.org
>Emne: Re: SV: Using Postgres jdbc driver with Oracle SQL Developer
>
>Try Replacing hostname by hostname/Database?
>Don’t Forget ?
>
>Regards
>Pascal
Ha! Thats it!. Almost.
Its