alan wrote:
> Can I write a BEFORE ROW trigger for the products table to runs
> on INSERT or UPDATE to
> 1. insert a new category & return the new category_id OR
> 2. return the existing category_id for the (to be inserted row)
What would you be using to match an existing category? If th
On Mon, Jul 25, 2011 at 12:00 PM, Filippos wrote:
> Dear all
>
> first of all congratulations on your greak work here since from time to time
> i 've found many answers to my problems. unfortunately for this specific
> problem i didnt find much relevant information, so i would ask for your
> guida
Li Jin writes:
> Anyone knows why the planner is doing this?
WITH is an optimization fence. This is intentional and documented.
regards, tom lane
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://
Hi,
I want to configure Logging of postgres in such a way that messages of
different severity should be logged in different log file. eg: all ERROR
message should be written in error-msg.log file while all NOTICE mesage
should be written in notice-msg.log file.
In order to do that what changes sho
Thanks Pavan!
I think the most important points are still that:
1. The WAL write should be happening asynchronously (if that is possible)
2. There should be an option do not perform these compactions if the page is
only touched by reads.
(Assuming that when most of the databaseresides in the ca
next question.
I have a product table with a 'category" column that I want to
maintain in a separate table.
CREATE TABLE products (
product_id INTEGER DEFAULT
nextval('product_id_seq'::regclass) NOT NULL,
name VARCHAR(60) NOT NULL,
category SMALLINT
Hi guys,
I met with the problem that when I was using WITH clause to reuse a subquery, I
got a huge performance penalty because of query planner.
Here are the details, the original query is
EXPLAIN ANALYZE WITH latest_identities AS
(
SELECT DISTINCT ON (memberid) memberid, username, change
On Jul 25, 2011, at 12:08 PM, Adarsh Sharma wrote:
> I restore globedatabase from a .sql file on yesterday morning.I insert some
> new data in that database.
> In the evening, by mistake I issued a drop database globedatabase command.
> Today morning, I restore again the same database from backu
Dear all
first of all congratulations on your greak work here since from time to time
i 've found many answers to my problems. unfortunately for this specific
problem i didnt find much relevant information, so i would ask for your
guidance dealing with the following situation:
we have a dedicated
I think I figured it out myself.
If anyone sees issues with this (simple) approach, please let me know.
I changed my table definitions to this:
CREATE SEQUENCE public.product_id_seq
CREATE TABLE products (
product_id INTEGER DEFAULT nextval('product_id_seq'::regclass) NOT
NULL,
name VARCH
On 25/07/11 02:06, Дмитрий Васильев wrote:
I have a problem with poor query plan.
My PostgreSQL is "PostgreSQL 8.4.8, compiled by Visual C++ build 1400,
32-bit" installed by EnterpriseDB installer on Windows 7 32 bit.
Steps to reproduce:
Start with fresh installation and execute the following:
> My first approach would be to remove WeekAvg and MonthAvg from the
> table and create a view which calculates appropriate values.
Thanks Robert, I had to upgrade to 9.0.4 to use the extended windowing
features.
Here is how I set it up. If anyone sees an issue, please let me know.
I'm new to post
Rohan Malhotra wrote:
First off, for a one-row result with too many values to fit on one
line, you might want to use this in psql:
\x on
More importantly, you seem to be misinterpreting the numbers.
You've allocated 2,205,969,940 buffers. Of those allocations, the
allocating backend had t
Hi,
I am a Noob with db tuning and trying to analyze pg_stats_brwriter data
checkpoints_timed | checkpoints_req | buffers_checkpoint | buffers_clean |
maxwritten_clean | buffers_backend | buffers_alloc
---+-++---+--
14 matches
Mail list logo