On 6/8/05, K C Lau <[EMAIL PROTECTED]> wrote:
> Both keys are text fields. Does it make any difference if PlayerID were
> integer?
>
It can make a difference in speed and integrity. If the column is an
integer, the storage on disk could be smaller for the column and the
related indexes. If the
Both keys are text fields. Does it make any difference if PlayerID were
integer?
BTW, I think the real performance problem is when we use SELECT ... ORDER
BY PlayerID DESC, AtDate DESC LIMIT 1 in a VIEW. Please see my subsequent
email http://archives.postgresql.org/pgsql-performance/2005-06/ms
On 6/2/05, K C Lau <[EMAIL PROTECTED]> wrote:
...
>
> select DISTINCT ON (PlayerID) PlayerID,AtDate from Player where
> PlayerID='0' order by PlayerID desc, AtDate desc;
> The Player table has primary key (PlayerID, AtDate) representing data over
> time and the query gets the latest data for
At 19:45 05/06/06, PFC wrote:
Previously, we have also tried to use LIMIT 1 instead of DISTINCT, but
the performance was no better:
select PlayerID,AtDate from Player where PlayerID='0' order by
PlayerID desc, AtDate desc LIMIT 1
The DISTINCT query will pull out all the rows and k
Previously, we have also tried to use LIMIT 1 instead of DISTINCT, but
the performance was no better:
select PlayerID,AtDate from Player where PlayerID='0' order by
PlayerID desc, AtDate desc LIMIT 1
The DISTINCT query will pull out all the rows and keep only one, so the
one with LI
Hi All,
We are testing PostgreSQL 8.0.3 on MS Windows for porting an OLTP system
from MS SqlServer.
We got a major performance issue which seems to boil down to the following
type of query:
select DISTINCT ON (PlayerID) PlayerID,AtDate from Player where
PlayerID='0' order by PlayerID