From: | Robert Fitzpatrick <lists(at)webtent(dot)net> |
---|---|
To: | PostgreSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Permance issues with migrated db |
Date: | 2007-05-22 17:15:56 |
Message-ID: | 1179854156.28503.80.camel@columbus.webtent.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 2007-05-22 at 19:04 +0200, PFC wrote:
> > I thought the same thing. While I'm not a MS SQL guru, I put 'TOP 100
> > PERCENT' after SELECT in the query. The Enterprise Manager does not
> > indicate how many rows come back. I save it as a VIEW in MS SQL and do a
> > 'select count(*)...' and, yes, it comes back 42164877 records.
>
> No, it comes back 1 record with the count in it, the ORDER BY is useless
> for a count(*), etc.
>
> What is it that you are trying to do exactly ?
Yes, one record indicating over 42 million records available from the
view, correct? I realized this after my first post, there is no 'ORDER
BY' in my last post with the two query examples.
I'm trying to my query in pgsql to return a result in the same amount of
time (approx) than it does in the existing mssql db. The query comes
back with results using MS SQL Enterprise Manager in seconds and the
same query in pgadmin takes super long. I just tried running the query
now and it is still going with over 200K ms clocked. If I stop the
query, remove all references to tblcontactinfo and tblactivitytag, the
query comes back in less than 6000 ms.
--
Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Joseph Shraibman | 2007-05-22 17:17:41 | swap storm created by 8.2.3 |
Previous Message | Tom Lane | 2007-05-22 17:10:43 | Re: Permance issues with migrated db |