Re: JDBC & Tempdb file growth

From: Frank Brouwer (frank.brouwer_nospam_at_trimergo.nl)
Date: 09/09/04

  • Next message: david: "slow connections with jdbc driver and no entry in hosts file"
    Date: Thu, 9 Sep 2004 20:23:01 +0200
    
    

    Hi,

    A way to avoid this is to use the "simple" recovery model setting of the
    database. You can find this setting at Database ==> properties ==> tab
    options ==> at "Recovery setting". The default setting is "full" which uses
    a huge amount of tempdb. Most of the time it is not really needed when you
    do not need to recover certain transactions after a crash.

    Regards,

    Frank.

    "Josh @ American Data" <Josh @ American Data@discussions.microsoft.com>
    wrote in message news:66BFB02F-6E53-4CD3-8612-03BA79F88DBD@microsoft.com...
    > Hello,
    >
    > Yesterday our tempdb exceded the remaining space on its drive, and our SQL
    > server instance became incapacitated. The file reached over 1.5gb.
    >
    > I understand that this file grows as needed, and when the SQL server
    > instance is restarted it returns to an initial size of about 8mb.
    >
    > I'm concerned that there is something odd with our environment that is
    > causing such tremendous growth.
    >
    > The application using the DB is very simple. It is more or less a web
    page
    > that performs a query in 1 table. Yes, there are some other more
    elaborate
    > features, but this is the query that is performed 90% of the time. This
    page
    > is probably hit a couple of times a day... and the DB is very small (a
    couple
    > of megs).
    >
    > I don't understand why the tempdb could be growing so large over time.
    > Yesterday we restarted SQL server, therefore reducing the file size of the
    > tempdb. Then, we hit the page about 30 times that performs this simple
    query
    > (a select and order on a table that contains about 3 rows). All of the
    > sudden, the file grew by about 4 megs. This seems odd to me.)
    >
    > I've been monitoring the tempdb for a day now and it seems to keep
    growing,
    > and not shrinking or leveling. It is now at 90 megs.
    >
    > Does the tempdb store information indefinately, or is it released when no
    > longer needed. I'm trying to pinpoint any potential problems. Here are
    some
    > of my hypothesis:
    >
    > 1.) We are using connection pooling. Is it possible that the pool keeps
    a
    > dedicated number of sessions with the DB available at all times, and
    > therefore, MS SQL server is never releasing temp info from the tempdb
    because
    > as far as it knows, the connections are never closed?
    >
    > 2.) We simply need to improve our SQL code, and remove complex querries
    and
    > order statements. Although, the one page I've referred to doesn't contain
    > any complex querries, it does contain an order by statement. This seems
    > highly unlikely this is the problem being that this table contains about 3
    > rows and the querry is fairly simple. Could this cause the tempdb to
    expand
    > so much?
    >
    > 3.) We have set a property in our jdbc connect: SelectMethod=Cursor.
    Could
    > this be a poor decision in the way it effects the tempdb growt? Isn't it
    > needed if we are using result sets?
    >
    > Any thoughts are greatly appreciated. Please let me know if you would
    like
    > any more detailed information and I'd be glad to assist.
    >
    > Thanks to anyone who is willing to assist in advance.


  • Next message: david: "slow connections with jdbc driver and no entry in hosts file"

    Relevant Pages

    • RE: ASPState Bug/Security issue
      ... I accept that my *state* doesn't persist after sql server ... after a sql server restart EVEN IF YOU DON'T CARE THAT ... Microsoft's guidelines for how to access tempdb properly, ... to resolve it is to use persiststate version. ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: TempDB & Performance/Storage space issues
      ... > query, it starts with the first two, joins them & stores the results ... > tempdb, and so on. ... The SQL Server optimizer is cost-based and will try to determine the ... I suggest you take a look at the query execution plan and try to address ...
      (microsoft.public.sqlserver.server)
    • Re: Slow UPDATE and DELETE on SQL Server 2000
      ... I've increased the size of the TempDb database and noticed ... When I ran the update query I got an error message about not being ... I did read the execution plans incorrectly. ... > SQL Server process, memory, as well as the SQL Server specific counters. ...
      (microsoft.public.sqlserver.server)
    • RE: ASPState Bug/Security issue
      ... Hello Brian, ... Please refer to the following statement from SQL server books online: ... tempdb holds all temporary tables and temporary stored procedures. ... !Subject: RE: ASPState Bug/Security issue ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Slow UPDATE and DELETE on SQL Server 2000
      ... it is trying to "cache" as much of the transaction in memory as possible ... it looks like it is doing a lot of temp work in the tempdb. ... I did read the execution plans incorrectly. ... >> SQL Server process, memory, as well as the SQL Server specific counters. ...
      (microsoft.public.sqlserver.server)

    Loading