Re: Data access perfomance



Hi, thanks I kind reduce the time inserting into the database, the problem
was that I had a primary key on the table,
then I drop the keys and created a non clustered index, the insertion
reduce from 20 minute to 10, and into a document that lasted 11 hours the
time reduce to 5,
but this had one miliion registers.
Still I believe It's slow.
The insert statemente looks like
@ARE THE COMMAND REPLACED BY MY LOGIC@
? are the order parameters sent to the OledbParameters

INSERT INTO @TABLE_NAME@(COLUMN_NAME1, COLUMN_NAME2...)
VALUES( ?, ?...)

I better don't create stored procedures, my idea with this kind of
applications
is that the database structure should not be modified, but thanks anyway.
What does exactly do the Prepared() method?.

"Erland Sommarskog" wrote:

> Erland Sommarskog (esquel@xxxxxxxxxxxxx) writes:
> > How these INSERT statements look like? Do you compose the full string
> > or do you parameterise the command?
> >
> > I can't discuss Oracle, but for SQL Server, the following measures
> > can be taken:
> >
> > 1) Use parameterised commands (this applies to Oracle as well, as you
> > should never put in your values directly into the string.)
>
> I forgot to mention: I believe that there is a .prepare method/property
> on the command object. Setting this one can also be a way to improve
> performance.
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
>
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
>
>
.



Relevant Pages

  • Re: Re-Seed in SQL Server
    ... Add a new field to the table that holds the Primary Key. ... or something like that and make it an Autonumber field and a Primary Key. ... If the table is already on the SQL Server you could try the below. ... that your Autonumber field in the Access Database has gotten corrupted. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Changing linked SQL Server tables in code
    ... I was working with a test SQL Server ... database that I thought was a clone of production. ... Dim tdf As DAO.TableDef ... can't be updated unless it has a primary key defined. ...
    (comp.databases.ms-access)
  • Re: Identity crisis: GUID VS. Range
    ... I'm using SQL Server automatic identity ranges. ... the primary key then the index can grow a lot. ... central Sql Server 2005 database. ... Assign ranges of primary keys in each subscriber in order to assign ...
    (microsoft.public.sqlserver.replication)
  • Re: How to list tables with Primary keys
    ... We imported a bunch of tables from a database and realized that the ... Also, for future reference, is there a way to include the primary key ... SQL Server index performance ... SQL Server - optimization:index performance ...
    (comp.databases.ms-sqlserver)
  • Re: problem using identity column as primary key
    ... >> I am thinking of creating an identity column to use it as primary key ... More and more programmers who have absolutely no database training are ... the gap in the sequence is not filled in and the sequence ... vin CHARNOT NULL REFERENCES Motorpool); ...
    (microsoft.public.sqlserver.programming)