From: | zilch(at)home(dot)se |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: inserting, index and no index - speed |
Date: | 2001-06-10 20:34:30 |
Message-ID: | 20010610223430.A29479@loony |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> zilch(at)home(dot)se writes:
> > then I have this little C++ program that inserts N rows into the tables,
> > meassures how long it takes.
>
> Which is done how, exactly?
>
> regards, tom lane
---
// delete from index_with
// vacuum
// vacuum analyze
timeAnalyzer.startClock();
for ( int i = 0; i < nrIterations; i++) {
sprintf(sqlStatement, "INSERT INTO index_with (name) VALUES ('%s')", data[i]);
try {
db->runCommand(sqlStatement);
}
catch(Exception e) {
cout << "Exception caught: " << e.getException() << endl;
}
}
timeAnalyzer.stopClock();
// output
---
data[i] is data created with 'pwgen 8 100000 > data'
Then anotherone but index_without instead.
Could it be that the 10000 rows in the table makes it so much slower so that
the next 10000 in the same database but different table get so much slower?
Daniel Akerud
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2001-06-10 20:49:47 | Re: foreign keys constraints, depending on each other |
Previous Message | Tom Lane | 2001-06-10 20:09:56 | Re: inserting, index and no index - speed |