Unlogged tables can't be temporary.
2011/10/13, Ivan Voras :
> On 13/10/2011 14:34, Alban Hertroys wrote:
>
>>> Any other ideas?
>>
>> CREATE TABLE to_delete (
>> job_created timestamp NOT NULL DEFAULT now(),
>> fk_id int NOT NULL
>> );
>>
>> -- Mark for deletion
>> INSERT INTO to_delete (fk_i
On 13 October 2011 20:08, Steve Crawford wrote:
> On 10/13/2011 05:20 AM, Ivan Voras wrote:
>>
>> Hello,
>>
>> I have a table with a large number of records (millions), on which the
>> following should be performed:
>>
>> 1. Retrieve a set of records by a SELECT query with a WHERE
>> condit
On 10/13/2011 05:20 AM, Ivan Voras wrote:
Hello,
I have a table with a large number of records (millions), on which the
following should be performed:
1. Retrieve a set of records by a SELECT query with a WHERE condition
2. Process these in the application
3. Delete them
On 10/13/2011 16:20, Ivan Voras wrote:
Hello,
I have a table with a large number of records (millions), on which the
following should be performed:
1. Retrieve a set of records by a SELECT query with a WHERE condition
2. Process these in the application
3. Delete them fr
On 13/10/2011 14:34, Alban Hertroys wrote:
>> Any other ideas?
>
> CREATE TABLE to_delete (
> job_created timestamp NOT NULL DEFAULT now(),
> fk_id int NOT NULL
> );
>
> -- Mark for deletion
> INSERT INTO to_delete (fk_id) SELECT id FROM table WHERE condition = true;
>
> -- Process in app
>
If you don't need the data for more then a transaction, or connection
length - use temporary tables to store ids of data you need to delete.
If those change, or move, or something - it means you are missing PK
on that table.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To
On 13 October 2011 14:20, Ivan Voras wrote:
> Hello,
>
> I have a table with a large number of records (millions), on which the
> following should be performed:
>
> 1. Retrieve a set of records by a SELECT query with a WHERE condition
> 2. Process these in the application
> 3.
Hello,
I have a table with a large number of records (millions), on which the
following should be performed:
1. Retrieve a set of records by a SELECT query with a WHERE condition
2. Process these in the application
3. Delete them from the table
Now, in the default read-co