How can I group all children by their parent ?
id email parent_id
1 t...@test.com nil
2 te...@test.com 1
3 email 1
4 email 2
5 email nil
6 email 3
Regards,
Arup Rakshit
Le 2014-07-17 à 09:08, Arup Rakshit arupraks...@rocketmail.com a écrit :
How can I group all children by their parent ?
id email parent_id
1 t...@test.com nil
2 te...@test.com 1
3 email 1
4 email 2
5 email nil
6 email 3
Le 17/07/2014 15:08, Arup Rakshit a écrit :
How can I group all children by their parent ?
id email parent_id
1 t...@test.com nil
2 te...@test.com 1
3 email 1
4 email 2
5 email nil
6 email 3
Regards,
Arup Rakshit
Did you mean
SELECT array_agg(id), array_agg(email), parent_id FROM ... GROUP BY
ORDER BY parent_id, id ?
François Beausoleil
parent_id .. But why order_by.. I thought I need to group by
parent child email
1 2 te...@test.com
3 email
Arup Rakshit wrote
ORDER BY parent_id, id ?
François Beausoleil
parent_id .. But why order_by.. I thought I need to group by
parent child email
1 2
test1@
3 email
The word group as you have used it can mean:
Generate a single record for each
On Thu, 17 Jul 2014 21:28:14 +0800
Arup Rakshit arupraks...@rocketmail.com wrote:
ORDER BY parent_id, id ?
parent_id .. But why order_by.. I thought I need to group by
Perhaps you need to tell us what your problem is instead of your
solution. What exactly are you trying to accomplish here?
On 07/16/2014 12:05 PM, jlliu wrote:
Hi,
PostgreSQL version: 9.1.16. Linux: RHEL6.
After a heavy traffic run, a huge pg_toast table is seen. Its size is ~3G.
There also exist other pg_toast tables in a much smaller size, for example,
~100M. The problem is that that huge pg_toast table never
H2 or SQLite can be very reasonable choices for in-app embedded
databases, so long as your app can operate within their constraints on
concurrency and data size.
Firefox uses SQLite and the places.sqlite database is notorious for
getting corrupted every five minutes. Libreoffice/Openoffice
Hello All
i had a database load issue today and when i was checking logs
i saw this message. I m running postgresql 8.3
db::ts:2014-07-17 09:38:21 PDT::LOG: checkpoints are occurring too
frequently (26 seconds apart)
db::ts:2014-07-17 09:38:21 PDT::HINT: Consider increasing the
On Thu, 17 Jul 2014 10:44:32 -0700
Prabhjot Sheena prabhjot.she...@rivalwatch.com wrote:
Hello All
i had a database load issue today and when i was checking logs
i saw this message. I m running postgresql 8.3
db::ts:2014-07-17 09:38:21 PDT::LOG: checkpoints are occurring too
Potentialtech wmo...@potentialtech.com writes:
If the warning isn't happening too often, I would try increasing it only a
little and see if it helps. If it's not enough you can then increase it some
more. Various sources around the Internet suggest that you don't want to go
much larger than
Thanks i have changed that to 64 and reloaded it.
When i had load issue today there was this exact same query that hits the
db like 50 to 60 times from different machines in 3 to 4 minutes and was
taking long time to execute and was holding up the database. i did recreate
an index and it started
On Thu, 17 Jul 2014 14:06:28 -0400
Tom Lane t...@sss.pgh.pa.us wrote:
Potentialtech wmo...@potentialtech.com writes:
If the warning isn't happening too often, I would try increasing it only a
little and see if it helps. If it's not enough you can then increase it
some
more. Various
On Thu, 17 Jul 2014 11:28:04 -0700
Prabhjot Sheena prabhjot.she...@rivalwatch.com wrote:
Thanks i have changed that to 64 and reloaded it.
When i had load issue today there was this exact same query that hits the
db like 50 to 60 times from different machines in 3 to 4 minutes and was
Hi,
I have been facing lock contention in my Postgresql 9.1 DB.
And when I am querying in the pg_locks table I found a lock type with
transactionid.
Could someone please tell me what it means?
Thanks.
On Thu, Jul 17, 2014 at 3:34 PM, AI Rumman rumman...@gmail.com wrote:
Hi,
I have been facing lock contention in my Postgresql 9.1 DB.
And when I am querying in the pg_locks table I found a lock type with
transactionid.
Could someone please tell me what it means?
Thanks.
from
I am experiencing lock contention on one single UPDATE statement at a
certain time in whole day. This is a small table to UPDATE.
My suspect is we are facing it for one specific ID.
Could you please let me know how can I identify the tuple.
I got a log like follows:
blocker_target
On Thu, Jul 17, 2014 at 12:54 PM, AI Rumman rumman...@gmail.com wrote:
I am experiencing lock contention on one single UPDATE statement at a
certain time in whole day. This is a small table to UPDATE.
My suspect is we are facing it for one specific ID.
Could you please let me know how can I
For reference:
https://wiki.postgresql.org/wiki/Streaming_Replication
Assume a master - slave streaming replication configuration, Postgresql
9.2.
Assume that the master has been chugging away, but the slave PG service
has been offline
for a while and the wal archive has updated enough that
Yes. But as we are using bind variables, we are not able to get the ID of
the tuple.
On Thu, Jul 17, 2014 at 2:08 PM, Douglas J Hunley doug.hun...@gmail.com
wrote:
On Thu, Jul 17, 2014 at 12:54 PM, AI Rumman rumman...@gmail.com wrote:
I am experiencing lock contention on one single UPDATE
Here is the explain plan. There query time went backup up to 2 to 3 minutes
from 3 second in just 2 hrs. Can anyone suggest something on how to fix
this or why this is happening
explain SELECT account.id, account.organization_id, run.application_id,
work_unit.script, work_unit.id,
even though the explain plan suggests differently but its taking long long
time
On Thu, Jul 17, 2014 at 4:26 PM, Prabhjot Sheena
prabhjot.she...@rivalwatch.com wrote:
Here is the explain plan. There query time went backup up to 2 to 3
minutes from 3 second in just 2 hrs. Can anyone
On 7/17/2014 4:26 PM, Prabhjot Sheena wrote:
Here is the explain plan. There query time went backup up to 2 to 3
minutes from 3 second in just 2 hrs. Can anyone suggest something on
how to fix this or why this is happening
explain SELECT account.id http://account.id,
On 7/17/2014 11:28 AM, Prabhjot Sheena wrote:
SELECT account.id http://account.id, account.organization_id,
run.application_id, work_unit.script, work_unit.id
http://work_unit.id, work_unit.start_time, run.id http://run.id,
work_unit.priority FROM work_unit, run, account WHERE
i just did explain analyze and currently database is running slow coz of
the query
explain ANALYZE SELECT account.id, account.organization_id,
run.application_id, work_unit.script, work_unit.id, work_unit.start_time,
run.id, work_unit.priority FROM work_unit, run, account WHERE
work_unit.status
On 7/17/2014 5:01 PM, Prabhjot Sheena wrote:
i just did explain analyze and currently database is running slow coz
of the query
explain ANALYZE SELECT account.id http://account.id,
account.organization_id, run.application_id, work_unit.script,
work_unit.id http://work_unit.id,
On 07/17/2014 07:30 AM, Wolfgang Keller wrote:
H2 or SQLite can be very reasonable choices for in-app embedded
databases, so long as your app can operate within their constraints on
concurrency and data size.
Firefox uses SQLite and the places.sqlite database is notorious for
getting corrupted
The overall load of system is good. It is a vm but the other database is
running normal and not doing much activity
vmstat 5 10
procs ---memory-- ---swap-- -io --system--
-cpu--
r b swpd free buff cache si sobibo in cs us sy id
wa st
0 2
On 7/17/2014 5:36 PM, Prabhjot Sheena wrote:
The overall load of system is good. It is a vm but the other database
is running normal and not doing much activity
other database? is that on the same postgresql cluster? or on a
seperate instance of the postgres server on the same VM? or on
you can run select * from pg_stat_replication on master to check all the
salve stats.
On Fri, Jul 18, 2014 at 6:50 AM, Lists li...@benjamindsmith.com wrote:
For reference:
https://wiki.postgresql.org/wiki/Streaming_Replication
Assume a master - slave streaming replication configuration,
Dear List,
I am interested in replicating views of my data in real time to a
frontend visualizer. I've looked around, and it seems that most
applications in this direction write some ad-hoc json-formatter that
spits out exactly the columns it is interested in. I want something
more like
Nick Guenther wrote
Dear List,
I am interested in replicating views of my data in real time to a
frontend visualizer. I've looked around, and it seems that most
applications in this direction write some ad-hoc json-formatter that
spits out exactly the columns it is interested in. I
32 matches
Mail list logo