Re: inserting, index and no index - speed
От | zilch@home.se |
---|---|
Тема | Re: inserting, index and no index - speed |
Дата | |
Msg-id | 20010610223430.A29479@loony обсуждение исходный текст |
Ответ на | Re: inserting, index and no index - speed (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: inserting, index and no index - speed
|
Список | pgsql-general |
> zilch@home.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
В списке pgsql-general по дате отправления: