Edson,
* Edson Richter (edsonrich...@hotmail.com) wrote:
> The programmer added a
>
> LOCK TABLE MyTableName
>
> just before issuing the select max(id) from MyTableName.
>
> I do suspect this is the case, right?
Yup, that'll do it.
http://www.postgresql.org/docs/9.3/static/sql-lock.html
Em 28/04/2014 12:01, Tom Lane escreveu:
Edson Richter writes:
When I issue a
select max(id) from MyTableName
Postgres 9.2.7 is scaling a AccessExclusiveLock and causing large delays.
Really?
regression=# create table MyTableName (
regression(#id integer not null primary key,
regression(#
Edson Richter writes:
> When I issue a
> select max(id) from MyTableName
> Postgres 9.2.7 is scaling a AccessExclusiveLock and causing large delays.
Really?
regression=# create table MyTableName (
regression(#id integer not null primary key,
regression(#seqYear char(4),
regression(#s
On table
create table MyTableName (
id integer not null primary key,
seqYear char(4),
seqCount integer,
...)
Where id is primary key and (seqYear, seqCount) is a unique index.
Table facts: about 40 fields, 1 million records.
When I issue a
select max(id) from MyTableName
Postgres 9.2
Ok, it is
# select id from pref_money where money in (select max(money) from
pref_money group by yw);
id
DE8048
VK91770810
DE7115
OK252342810632
OK22853997
(5 rows)
And to see how many times a player has won is:
# select count(id) from pref_money where id='DE7115
Hello,
I have this table where I store player results for each week:
# select * from pref_money limit 5;
id | money | yw
+---+-
OK32378280203 | -27 | 2010-44
OK274037315447 | -56 | 2010-44
OK19644992852 | 8 | 2010-44
OK21807961329 | 114
Merlin Moncure writes:
do a big delete recently? any other open transactions?
Some inserts were taking place. Roughly 2 to 5 million rows inside
transactions. We were doing some ETL and each batch represented a file we
were loading. We need to have the entire file or roll back so each file
On Fri, May 21, 2010 at 1:48 PM, Francisco Reyes wrote:
> Tom Lane writes:
>
>> Francisco Reyes writes:
>>>
>>> I am trying to do
>>> select max(primary_key) from some_table;
>>
>> Are there a whole lot of nulls in that column?
>
>
> Zero nulls. It is a primary key.
do a big delete recently? an
Francisco Reyes writes:
> Tom Lane writes:
>> Francisco Reyes writes:
>>> I am trying to do
>>> select max(primary_key) from some_table;
>> Are there a whole lot of nulls in that column?
> Zero nulls. It is a primary key.
Huh. The proposed plan should have run in basically zero time then.
You
Tom Lane writes:
Francisco Reyes writes:
I am trying to do
select max(primary_key) from some_table;
Are there a whole lot of nulls in that column?
Zero nulls. It is a primary key.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
Francisco Reyes writes:
> I am trying to do
> select max(primary_key) from some_table;
Are there a whole lot of nulls in that column?
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www
Postgres 8.4.1
CentOS 5.4
I am trying to do
select max(primary_key) from some_table;
The explain looks like:
explain select max(primary_key) from some_table;
QUERY PLAN
-
Oleg Bartunov wrote:
>
> yOn Sat, 14 Feb 2009, searchelite wrote:
>
>>
>> Dear All
>>
>> i gave this kind of query
>>
>> select max(foo) from (select some statement) as foo
>>
>> but it gave me this error
>> ERROR: function max(record) does not exist
>>
>>
>> any help how i can select max val
yOn Sat, 14 Feb 2009, searchelite wrote:
Dear All
i gave this kind of query
select max(foo) from (select some statement) as foo
but it gave me this error
ERROR: function max(record) does not exist
any help how i can select max value from suqbuery in main query
like this:
select max(fo
select max(foo.record) from ...
?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 14/02/2009 11:05, searchelite wrote:
> select max(foo) from (select some statement) as foo
Can you post the full query? It's very hard to tell from this.
Also, I think you may need to give the subquery an alias, thus:
select max(foo) from ( ) s as foo
Ray.
--
Dear All
i gave this kind of query
select max(foo) from (select some statement) as foo
but it gave me this error
ERROR: function max(record) does not exist
any help how i can select max value from suqbuery in main query
thanks
--
View this message in context:
http://www.nabble.com/select-
17 matches
Mail list logo