Forum Replies Created

Viewing 15 posts - 10,501 through 10,515 (of 14,953 total)

  • RE: Are the posted questions getting worse?

    Just saw this one:

    prvreddy (3/12/2009)


    Hi all,

    1)Why a table have maximum one clustered index ?

    2)Please give me basic definitions of clustered and non-clustered indexes!

    3)What is fragementation and defragmentation?

    Please help me...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Why a table have maximum one clustered index ?

    GilaMonster (3/12/2009)


    lmu92 (3/12/2009)


    Even if it would be somebody who's completely new to SQL Server, those questions are unlikely to show up all at the same time...

    I don't agree there. They...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: record management database system

    Do you have a basic idea of what you want to do, and you're looking for suggestions/critique on it, or do you need to hire someone to design the database...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Stored Procedures

    JacekO (3/12/2009)


    GSquared, with all due respect - SQL pretends to nest transactions :). If the last ROLLBACK uncommits all your pervious work this is not nesting in my book.

    No. ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: The dumbest database design ever - shoot me

    I've tuned a lot of databases, sped up a lot of queries for a lot of applications, over the last 9 years. I have yet to find the index...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Stored Procedures

    JacekO, one error. SQL Server can nest transactions, to an extent. That's what @@Trancount is for.

    Try this to see what I mean:

    if object_id(N'tempdb..#T') is not null

    drop table #T;

    create...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Issue with CTE

    Bob Hovious (3/12/2009)


    Thanks G... or do you prefer G2 ?? 🙂

    Doesn't matter. Gus, G, G2, GSquared, even Hey You. It all works. 🙂

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Issue with CTE

    At 1-million, the syscolumns cross join took 297 milliseconds CPU, 291 total.

    Created a million-row BigNumbers table. 235 CPU, 243 total, using that.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: What will happen to the view and the table in such scenario

    Hemalatha (3/12/2009)


    GSquared thanks for the reply, but can you be more specific.

    You mean to say that

    If I have a table A, that has a primary key which is not being...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Issue with CTE

    31 milliseconds CPU and total for that one. Five runs, no real variation (32 ms one time out of five).

    Selecting from an actual Numbers table, 0 CPU, 14 total....

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: What will happen to the view and the table in such scenario

    Yes. Views don't really store data on their own. They're just a way to connect to the table(s) they query.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Issue with CTE

    Just ran this test:

    set statistics time off;

    set nocount on;

    declare @N int;

    set statistics time on;

    ;WITH

    L0 AS (SELECT 1 AS C UNION ALL SELECT 1), ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: time difference computation

    Another possible solution:

    create table #T (

    ID int primary key,

    StartDay int,

    StartTime char(5),

    EndDay int,

    EndTime char(5));

    insert into #T (ID, StartDay, StartTime, EndDay, EndTime)

    select 1,1,'21:10',1,'21:50' union all

    select 2,1,'22:48',1,'23:15' union all

    select 3,1,'23:50',2,'00:15';

    select

    datediff(

    minute,

    cast(starttime as...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Loop to update table

    There are a number of solutions for something like this. Which one is best depends a lot on what the data means and what it's for.

    For example, if it's...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Random 64 Characters alphanumeric String

    I think I'd be more inclined to use the one that stacks newids together than the one that actually picks more random character strings. Less likely to end up...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 10,501 through 10,515 (of 14,953 total)