• alopeze (10/20/2009)


    Hi Jeff, thanks a lot...

    Now that you are talking something about the WLAN, when i execute this query in the local server the time is 1 second, but when i execute the query in other computer in another office loke 1kilometer from the server the time too bad!.....

    thankyou Jeff!!!

    this is my create

    CREATE TABLE .[SubClasesMateriales](

    [IdSubClasesMateriales] [int] IDENTITY(1,1) NOT NULL,

    [IdClasesMateriales] [int] NOT NULL,

    [NoSubClase] [int] NULL,

    [NoTerminacionClase] [int] NULL,

    [Subclase] [varchar](25) NULL,

    [Descripcion] [varchar](1000) NULL,

    [Lote] [char](25) NULL,

    [Activo] [nchar](1) NULL,

    [FechaSistema] [smalldatetime] NULL,

    CONSTRAINT [PK_SubClasesMateriales] PRIMARY KEY CLUSTERED

    (

    [IdSubClasesMateriales] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    ) ON [PRIMARY]

    GO

    SET ANSI_PADDING OFF

    GO

    ALTER TABLE [MAYALUMM].[SubClasesMateriales] WITH CHECK ADD CONSTRAINT [FK_SubClasesMateriales_ClaseMateriales] FOREIGN KEY([IdClasesMateriales])

    REFERENCES [MAYALUMM].[ClaseMateriales] ([IdClaseMateriales])

    GO

    ALTER TABLE [MAYALUMM].[SubClasesMateriales] CHECK CONSTRAINT [FK_SubClasesMateriales_ClaseMateriales]

    Yeah... that's a tiny table. It should return almost instaneously. You'll need to talk with whoever is in charge of your network and WAN/LAN... depending on the comm line between the sites, there may be nothing you can do about this. I just went through the same thing... takes a very complicated proc only 12 seconds to run and the server and return the result set on the server... takes 139 seconds for it to make it from NY to Detroit. Company before that had the same problem. The comm lines were just terrible.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)