Re: SELECT COUNT(*) returning wrong value

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 08/26/04


Date: Thu, 26 Aug 2004 07:52:18 +0200

Also, might be worth forcing a table scan for the SELECT (*) query. Just to see if SQL Server picks an index
for the count where the index has some problems.

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Adam Machanic" <amachanic@hotmail._removetoemail_.com> wrote in message
news:u1lspTwiEHA.556@tk2msftngp13.phx.gbl...
> Next step I might take is to create a new database (preferably on a
> different server) and use DTS to copy those two tables over to it... Then
> run the same queries and see what happens.  If that doesn't work out, post
> DDL (CREATE TABLE statements) and some sample data (INSERT statements) to
> reproduce the problem so I can try it on my end.
>
> By the way, are you running the latest service pack?  If not, try updating
> that first.
>
>
> "Stan Rozendal" <StanRozendal@discussions.microsoft.com> wrote in message
> news:385793CF-A9E1-47CD-A290-C7F2C1B1D84A@microsoft.com...
> >
> > I tried the SELECT again but still getting the same results.
> >
>
>


Relevant Pages

  • Re: CONTAINS performance
    ... That said, and with the query plan, I can start to give you more ... relational join in the context of the free-text optimization, ... SQL Server tables. ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Indexing Service, Openquery and sp_executesql
    ... SQL Server version and sp are you running? ... > data from the indexing service catalog when pasted into ... > query analyzer, but failed when put against sp_executesql ... I would choose Microsoft Indexing ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Problem using Access or Query Designer to run queries in SQL Serve
    ... >or Query Designer within Enterprise Manager, it works and I get data back. ... >ODBC Call Failed [ODBC SQL Server Driver] Timeout Expirederror in Access ... >[ODBC SQL Server Driver] Timeout Expired ...
    (microsoft.public.sqlserver.odbc)
  • Re: Transaction Isolation Level
    ... This means that while I initiate a transaction selecting all new orders it ... My query is executed on a SQL server 2005. ... the isolation level you should use is snapshot isolation. ...
    (comp.databases.ms-sqlserver)
  • Extreme performance issues (SQL Server 2000/ADO.NET/C#)
    ... This process runs very quickly if run through Query ... same exact stored procedures and views, run in the same exact order, through ... system that runs SQL Server (a 4-cpu Xeons system with 2gigs of physical ... When I execute these steps manually through query analyser,, ...
    (microsoft.public.dotnet.framework.adonet)