Dima
My question is that I want to produce ALL the lastest 3 records for EACH
itemNo and supplier.
Jack
- Original Message -
From: "dima" <[EMAIL PROTECTED]>
To: "jack" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 4:34 PM
Subject: Re: [SQL] the best way to
jack :
select * from purchase as p
where purchase_date >= ( select min(ppp.purchase_date)
from (select pp.purchase_date
from purchase as pp
where p.item_no = pp.item_no
jack :
select * from purchase as p
where purchase_date >= ( select min(ppp.purchase_date)
from (select pp.purchase_date
from purchase as pp
where p.item_no = pp.item_no
jack :
select * from purchase as p
where purchase_date >= ( select min(ppp.purchase_date)
from (select pp.purchase_date
from purchase as pp
where p.item_no = pp.item_no
Hi;
I've got a table with two fields and about 3000 rows, the second one is a
character field, what can have about twenty different values; of course these
values are repeated a lot of times in the table. I need to create a new
column of type integer, whose value depens on the character fields
Hi,
I have a view like this:
create view myview as
select recid, title, firstname || chr(32) || lastname as expert, rank
from mytable;
When I use this view via odbc on a Windows 2000 system using Visual FoxPro
the expert field shows up as a memo field. This is analogous to the text
field in P
Hi, all.
I'm putting together a small query that should return the most recent
entry from a table by date (I can't use an ID field as new entries may be
added with older dates). It's not crucial that this run at 100%
efficiency, but I'm interested in the results and/or discussion, as this
will pr
Has the performance for queries with lots of joins (more than 5) been
improved in v7.2 ?
I'm using 7.0.3 on Redhat 7.1 on a K2-6 500 CPU, and it is about 3 times
slower than MySQL, or Access on windoze platform :-(
I tried different command-line optimisations, and got the best results (on
oth
Hi,
I have created two databases,
db1 and db2 in my POSTGRESQL database system.
And both the databases contains few
tables also.
Could you please help me to write a
query which should retrieve data from both the databases
(Database joins and table
joins)
Expecting and earliest
reply
Regard
I have 2 tables, one is products and one is manufactors.
The products table has a col. for Product_descriptions and manufactor_id
column that is a foriegn key to the manufactors table.
The manufactors table has a manfuactor_description column, for each unique
Manufactor_id.
I want to search (us
On Mon, Sep 09, 2002 at 00:13:04 +,
Colin Fox <[EMAIL PROTECTED]> wrote:
>
> select
>*
> from
>motm
> order by
>creation_date desc
> limit 1;
>
> So in the first case I select the record that has the largest date. In the
> second case, I order all the records, and then return o
For implicit modification you can use a trigger on the table. If you
wan't store this data, you can use view.
andres javier garcia garcia ?:
>Hi;
>
>I've got a table with two fields and about 3000 rows, the second one is a
>character field, what can have about twenty different values; of c
select products.*, manufactors.*
from products, manufactors
where products.manufactor_id=manufactors.manufactor_id
and ( products.product_description like 'param%' or
manufactors.manufactor_description like 'param%');
regards
Jason Davis ?:
>I have 2 tables, one is products and one is manu
On Thursday 05 Sep 2002 11:15 pm, Linn Kubler wrote:
> Hi,
>
> I have a view like this:
> create view myview as
> select recid, title, firstname || chr(32) || lastname as expert, rank
> from mytable;
>
> When I use this view via odbc on a Windows 2000 system using Visual FoxPro
> the expert fiel
Would this work?
select recid, title, firstname || chr(32) || lastname::char(50) as expert,
rank from mytable where length(lastname) <= 50;
Troy
>
> Hi,
>
> I have a view like this:
> create view myview as
> select recid, title, firstname || chr(32) || lastname as expert, rank
>
On Friday 06 Sep 2002 11:59 am, [EMAIL PROTECTED] wrote:
> Has the performance for queries with lots of joins (more than 5) been
> improved in v7.2 ?
>
> I'm using 7.0.3 on Redhat 7.1 on a K2-6 500 CPU, and it is about 3 times
> slower than MySQL, or Access on windoze platform :-(
>
> I tried diff
On Mon, 9 Sep 2002, Jay wrote:
> Hi,
> I have created two databases, db1 and db2 in my POSTGRESQL database system.
> And both the databases contains few tables also.
> Could you please help me to write a query which should retrieve data from both the
>databases
> (Database joins and table joins
On Thu, 5 Sep 2002, Linn Kubler wrote:
> Hi,
>
> I have a view like this:
> create view myview as
> select recid, title, firstname || chr(32) || lastname as expert, rank
> from mytable;
>
> When I use this view via odbc on a Windows 2000 system using Visual FoxPro
> the expert field shows up a
On Mon, 9 Sep 2002 18:08:21 +1000
"jack" <[EMAIL PROTECTED]> wrote:
> Dima
> My question is that I want to produce ALL the lastest 3 records for EACH
> itemNo and supplier.
>
> Jack
I often use the next query for ranking, which is equivalent to Oracle's
PARTITION BY(). It isn't influenced by
Richard -
Your analysis of this looks right on, to me. With current code,
if you put in explicit JOINS, the table get joined in that order,
no questions. By specifying an all JOIN version, you've made the
optimizers job very easy: only one plan to consider.
Your point about realistic data and co
All,
Is there a way to easily change the type of column? Or do I have to drop
and create again.
From:
assignment_notes | character varying(255)
To:
assignment_notes | text
Thanks,
-p
---(end of broadcast)---
TIP 1: subscribe and unsubscribe co
I was wondering if there is a way to display all of the current queries
that are being submitted to the database. Thanks in advance.
-Sloan Bowman
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
its possible,
select * from pg_stat_activity after
AS connect as postgres.
THOUGH NEEd to configure postgresql.conf accordigly
regds
mallaH
> I was wondering if there is a way to display all of the current queries that are
>being
> submitted to the database. Thanks in advance.
>
> -Sloan
I am trying to port a Sybase table create script to one usable for
postgreSQL.
(note I am not a DBA)
In particular I am not well versed on how to use/recode the stored
procedures such as that in the example below.
ALTER TABLE DnaFragment
ADD PRIMARY KEY (dna_fragment_id)
go
exec sp_p
Richard Huxton <[EMAIL PROTECTED]> writes:
> Which says to me that your form is fine. Testing says otherwise, so there must
> be some element of the query that is not being accounted for in EXPLAIN
> ANALYSE.
To wit, planning time. EXPLAIN ANALYZE only counts execution time.
And planning time
Hi, Can someone explain my how the R-Tree
index works?. I just buy a Postgres's Developer book, but it only mentioned it.
Thanks.
Andrés
Sommerhoff
Hi,
I've been using Postgres for a while, almost exclusively through the
perl DBI (although I do plenty of work on the command line).
I have realized, belatedly, that I need transactions for this thing I
want to accomplish, but I've not done transactions before, so I need
a bit of help. And,
> if the primary key is table_id, with default value
> "nextval('table_seq') - then these two statements:
>
> insert into table (field1,field2,field3) values (value1,value2,value3)
> select currval('table_seq')
>
> work to get me the value I need. Except, of course if someone else
> has inserted a
Hi
Andreas,
I
asked myself the same question just yesterday. Here's something I found on
google (and there's much more there, as usual!)
http://icg.harvard.edu/~cs265/lectures/readings/guttman-1984.pdf
Cheers,
Markus
Gieppner
-Original Message-From:
[EMAIL PROTECTED]
Morning all ...
Josh Berkus the other day shook my cage a bit and reminded me to
create the -performance list that had been discussed awhile back ... so I
did :)
[EMAIL PROTECTED]
or
comp.databases.postgresql.performance
archives wont' show it up yet,
30 matches
Mail list logo