ulting from recursive errors...
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
On 2007-04-30, "John D. Burger" <[EMAIL PROTECTED]> wrote:
> Andrew - Supernews wrote:
>
>>> Anyone have any ideas on how to handle a work queue?
>>
>> Advisory locks (userlocks in pre-8.2).
>
> Can someone explain why these are a better fit t
On 2007-04-26, Steve Crawford <[EMAIL PROTECTED]> wrote:
> Anyone have any ideas on how to handle a work queue?
Advisory locks (userlocks in pre-8.2).
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of
y bits_ in your hash value than
you think you do. (e.g. using md5(), which is a 128-bit hash)
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
On 2007-01-21, Ron Johnson <[EMAIL PROTECTED]> wrote:
>> And no BDB (at least last I checked is not GPL)
>
> It's BSD (for obvious reasons), no?
No, Sleepycat's licence is _NOT_ BSD.
--
Andrew, Supernews
http://www.supernews.com - individual
7;s
rows, not over the outer query.
(Though there are ways to do this query without the subquery at all)
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 3: Have you che
test should not be related to fsyncs, and this does not seem to
> explain the huge discrepancy between update (1,000/sec) and insert
> (9,000 inserts/sec, also in 1-sec txns) performance.
Update has to locate the one live row version amongst all the dead ones;
insert doesn't need to bother
On 2006-10-13, Alexander Staubo <[EMAIL PROTECTED]> wrote:
> On Oct 13, 2006, at 17:13 , Andrew - Supernews wrote:
>> Your disk probably has write caching enabled. A 10krpm disk should be
>> limiting you to under 170 transactions/sec with a single connection
>> and fsyn
tive at
keeping the table size stable (at 70-odd pages) when running several
hundred thousand updates on a 1-row table.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
For a one-off update, use a temporary sequence:
create temporary sequence foo;
update table set recordid = nextval('foo');
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TI
;, 'foo:baz']),',');
array_to_string
--
baz:quux,foo:bar/baz
(1 row)
To understand the function, look at the subqueries from the inside out;
the inner one splits the foo:bar elements into two columns, groups by the
first and collects t
On 2006-09-18, "Jack Orenstein" <[EMAIL PROTECTED]> wrote:
> On 9/14/06, Andrew - Supernews <[EMAIL PROTECTED]> wrote:
>> One way:
>
> Thank you, I hope you can help with some clarifications.
>
>>
>> bytea *my_bytea = (bytea *) palloc(byte_a
e it with "" if needed) rather than use a parameter
for it.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
byte_array_len + VARHDRSZ;
values[0] = DirectFunctionCall1(textin,CStringGetDatum(yourstring));
values[1] = PointerGetDatum(my_bytea);
SPI_execute_plan...
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast
s :)
Some of the few things that pg can _not_ do inside a transaction include:
CREATE DATABASE
DROP DATABASE
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 9: In versions below
ax_code from warehouse.sec_trans group by tax_code;
Both of the DISTINCT variants rely on sorting. GROUP BY, on the other hand,
can use a hash aggregate, which will be much more efficient where the number
of distinct values is low. Of course it will still need to scan the whole
table...
--
Andrew, S
nnection ends. In the event of a crash, they are cleared out
when the temp schema is next recycled.
> Is it safe to remove those schemas ?
It is not necessary. I do not know if it is safe.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
--
ably up to date - pg 8.0 onwards carry their
own copy of the standard zoneinfo database with them).
Zone names like 'IST' are in any event entirely ambiguous and should never
be used - you could regard it as a pure fluke that pg happens to resolve
'IST' as +0200 rather than +0530...
ll connections.
relhassubclass isn't reset to false when all child tables of a parent
table are removed. So next time through there is no need to update the
pg_class row for the parent table.
So the simplest workaround is probably to ensure that you create at least
one partition in each ta
to own the DB?
It's worse than that. If you can _read_ pg_auth, then you can log in as
any user who has an MD5 password provided that pg_hba.conf allows md5
auth - the values stored in pg_auth (and pg_shadow) are password equivalents
for the purposes of md5 auth.
--
Andrew, Supernews
ng glacial, because
(unless it's a text dump and you edited in BEGIN/COMMIT statements yourself)
it'll be committing each row individually, which limits the restore speed to
a couple of hundred rows/sec unless you have evil (or battery-backed) write
caching or you've turned fsync
the table.
>
> You can write a trigger to check the count of records which overlaps
> (start,end):
Doesn't work reliably due to the race condition, unless you lock the table
against conflicting inserts. The problem of course is that the trigger
doesn't see uncommitted ro
n foo.id as the
inner path. Execution times for 8.1 are usually very slightly worse than
the equivalent IN (a,b,c,...) with literal values, but the plan time is
shorter.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broa
orrelated, and returns
true for all non-null values of v1 as long as t2 has at least one row.
> update t1 set v1=4 where v1 IN (select NULLIF(1,1) from t2);
v1 IN (NULL) is null for all v1, and WHERE treats null conditions as false.
--
Andrew, Supernews
http://www.supernews.com - ind
set null in
psql to see the difference.)
> Not without creating your own CAST.
Casting from what? NULL isn't a type...
> Seems to me that an obvious value would be 'NULL'. Or maybe ''
> (empty string).
If NULL ever got converted to 'NULL' or ''
e bool_and() or every() in the usual way as
a custom aggregate even on versions that don't have them builtin.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
put such a rule on a plain table, you
will find that the table changes into a view.)
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
do this all within the single query.
If there's only a small number of possible "state" values then:
ORDER BY state = 'a' DESC, state = 'b' DESC, state = 'c' DESC
If there's more than a small number, then have a separate state_priority
table map
:
Do you have any constraints, especially deferred constraints, or triggers
on the table? Are there any functional indexes?
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 1: if posti
get the same effect. (A
primary key constraint is just a unique constraint that is also not null,
and is the default target for REFERENCES constraints referring to the table -
this last factor is why there can be only one...)
--
Andrew, Supernews
http://www.supernews.com - individual and
hat the result say "10:01:01" regardless of what
timezone the client is in, then you want timestamp without time zone. If
what matters is that the result be the _same time_ regardless of what
timezone, then you want timestamp _with_ time zone. The second case is
vastly more common.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 6: explain analyze is your friend
hich covers most uses of timestamps.) Only use timestamp
without time zone for data storage if you have a specific reason to do so.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 9:
; and get answer after 3-10 seconds, is there a way to speed it up somehow?
> any tweaks and tuneups possible with it?
http://pgfoundry.org/projects/ip4r
Designed specifically for storing IP ranges as in your example, it will
(if correctly used) reduce that query time down to a few
n 8.0 on, use the method described here:
http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
99358864294
13:00:00 | 216.020873214721
14:00:00 | 224.915845037786
15:00:00 | 233.605042562575
16:00:00 | 242.016703682664
17:00:00 | 250.081358401684
18:00:00 | 257.732402570221
19:00:00 | 264.906647954345
20:00:00 | 271.544844092858
21:00:00 | 277.592167633387
22:00:00 | 282.99867510
On 2004-12-07, Stephen Frost <[EMAIL PROTECTED]> wrote:
> Is there a way to say "just take the value of this function at the start
> of the transaction and then have it be constant" in a query?
Why not use CURRENT_TIMESTAMP, etc., which do exactly that?
--
e world). Your column is of type "timestamp with time zone" (correct).
The relationship between the two is not trivial and the lack of an index
scan therefore expected. Try casting to "timestamp with time zone" instead.
--
Andrew, Supernews
http://www.su
BY
> name,name2 DESC LIMIT 1;
That needs to be ORDER BY name DESC, name2 DESC (the direction indicator
applies per-column and not to the output ordering). Same goes for the
WHERE clause in this query as the previous one, too.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 8: explain analyze is your friend
an fake session variables by using constant-returning functions
defined in the per-session temporary namespace.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 8: explain analyze is your friend
On 2004-11-24, Marc G Fournier From : <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (Andrew - Supernews) writes:
>>Any chance of there being regular (or even only occasional) signed
>>checkgroups messages for the new hierarchy?
>
> Sure, but I've never do
g RFDd
> right now pass, ppl are going to continue screaming that the other 15-16
> should be removed as well ... this way, thos using news.postgresql.org can
> still get access to the whole hierarchy, while the comp.* would only carry
> those that are deemed "official
ws.groups from your replies.
He's posting to the mailing list; he probably can't avoid dropping the
crosspost.
--
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
42 matches
Mail list logo