Professional Web Applications Themes

Global Temporary Table - Microsoft SQL / MS SQL Server

Thanks Sri, But I thought that querying from ##table will fetch the records directly from the cache. Don't u agree with me in that aspect. So why not query this ##table. Thanks anand  creation of the  is to create a  populate this table  over time too.  and present a [/ref] rows [/ref] trigger  > > >. >[/ref]...

  1. #1

    Default Re: Global Temporary Table

    Thanks Sri,
    But I thought that querying from ##table will fetch the
    records directly from the cache. Don't u agree with me in
    that aspect. So why not query this ##table.

    Thanks
    anand 
    creation of the 
    is to create a 
    populate this table 
    over time too. 
    and present a [/ref]
    rows [/ref]
    trigger 
    >
    >
    >.
    >[/ref]
    Anand Guest

  2. #2

    Default Re: Global Temporary Table

    80 milliseconds is not too bad?

    But if you have problems with the performance you might look at using an
    indexed view instead. There is extensive information about indexed views in
    Books Online.

    --
    Jacco Schalkwijk MCDBA, MCSD, MCSE
    Database Administrator
    Eurostop Ltd.


    "Anand" <org> wrote in message
    news:049601c34b97$ac102530$gbl... 


    Jacco Guest

  3. #3

    Default Re: Global Temporary Table

    Yes, it will query it from the cache. But if you think in terms of long term
    maintenance and usage of a similar structure, each client that potentially
    wants to use this ##table has to check for its existence etc. A static table
    on the other hand, can help you here.
    --
    HTH,
    SriSamp
    Please reply to the whole group only!
    http://www32.brinkster.com/srisamp

    "Anand" <org> wrote in message
    news:0b4b01c34ba0$e0d2ae60$gbl... 
    > creation of the 
    > is to create a 
    > populate this table 
    > over time too. 
    > and present a [/ref]
    > rows [/ref]
    > trigger 
    > >
    > >
    > >.
    > >[/ref][/ref]


    SriSamp Guest

  4. #4

    Default Re: Global Temporary Table

    Bill,

    The overhead associated with table variables is not that much less than that
    associated with temporary tables. Both have a similar implementation,
    although table variables won't participate in transactions and so take up
    less locking resources.

    You can't pass table variable from stored procedure to stored procedure.
    They go out of scope when you leave the procedure. That's were temporary
    tables are usefull because a stored procedure can access temporary table
    that have been created by a calling stored procedure.

    --
    Jacco Schalkwijk MCDBA, MCSD, MCSE
    Database Administrator
    Eurostop Ltd.


    "Alter Ego" <com> wrote in message
    news:jMmRa.117$news.prodigy.com... 
    sysobjects 
    persist 
    > > creation of the 
    > > is to create a 
    > > populate this table 
    > > over time too. 
    > > and present a 
    > > rows 
    > > trigger [/ref]
    >
    >[/ref]


    Jacco Guest

Similar Threads

  1. Get result from temporary Oracle Table
    By Franck in forum ASP.NET Web Services
    Replies: 0
    Last Post: April 28th, 07:48 AM
  2. Temporary table
    By Sauron in forum Informix
    Replies: 11
    Last Post: January 21st, 05:32 PM
  3. global temporary tables
    By Blair Adamache in forum IBM DB2
    Replies: 0
    Last Post: July 31st, 07:44 PM
  4. Temporary Table Query
    By Jonathan Derbyshire in forum Microsoft SQL / MS SQL Server
    Replies: 3
    Last Post: July 4th, 07:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139