Click here to Skip to main content
15,891,253 members
Home / Discussions / Database
   

Database

 
QuestionDatabase not fast enough? Pin
LukeV23-Oct-02 8:51
LukeV23-Oct-02 8:51 
AnswerRe: Database not fast enough? Pin
Daniel Turini23-Oct-02 9:03
Daniel Turini23-Oct-02 9:03 
GeneralRe: Database not fast enough? Pin
LukeV23-Oct-02 10:10
LukeV23-Oct-02 10:10 
GeneralRe: Database not fast enough? Pin
Daniel Turini23-Oct-02 10:17
Daniel Turini23-Oct-02 10:17 
GeneralRe: Database not fast enough? Pin
LukeV23-Oct-02 10:29
LukeV23-Oct-02 10:29 
AnswerRe: Database not fast enough? Pin
Vagif Abilov23-Oct-02 10:33
professionalVagif Abilov23-Oct-02 10:33 
GeneralRe: Database not fast enough? Pin
LukeV23-Oct-02 10:40
LukeV23-Oct-02 10:40 
AnswerRe: Database not fast enough? Pin
Matt Gullett23-Oct-02 11:52
Matt Gullett23-Oct-02 11:52 
Access isn't the fastest DB, but you should be able to achieve adequate performance for 20k rows of a relatively small table.

First, make sure you used indexes and use the right one. If the column 'word' contains a unique list of words, use the "Indexed - no duplicates" type of index.

Second, check the data type and size you used. It looks like you are using a "Text" data type which should be OK, but check the length of the column. The default is 50. Is this more than you need, if so, use a smaller value. Access always uses varchar data but you can force it to fixed-width by pre-filling the column with non-space data (such as the under-score _).

Third, the select count(*) statement will require a full table-scan unless the "indexed - no duplicates" option is used on the column. If you just need to know if the item is in the table, just do a "SELECT WORD from table where word = 'blablabla'". This would generate better performance if not using a unique index.

Fourth, consider removing the "select" statememt altogether. Just do an UPDATE and if it fails check the SQLCODE and perform an INSERT.

Sixth, if this is a single threaded GUI app you could just open a recordset against the table and disconnect it from the DB.

Seventh, if this is a GUI app (not ASP based) you can just load the whole word list into memory. If the maximum length of a word is 50 bytes and you can have 30K words, then you will need 1.5mb of ram.

Eighth, if you use an in-memory list and you don't want to risk losing updates, add a new table to your db called "Update_History" with an auto-number column and a 'Word' column. Each time the in-memory list is incremented, insert a record into this table. When your app finihes normally, walk through this table and perform the UPDATEs/INSERTs against your original table and then delete the table contents. When you app launches, check this table and if it is not empty just do the updates then.

GeneralRe: Database not fast enough? Pin
LukeV23-Oct-02 13:05
LukeV23-Oct-02 13:05 
GeneralWorking with DataSet and XSD files Pin
Noam Ben Haim23-Oct-02 6:13
Noam Ben Haim23-Oct-02 6:13 
GeneralConnecting from ASP.Net to MySql Pin
Smitha Nishant23-Oct-02 2:25
protectorSmitha Nishant23-Oct-02 2:25 
GeneralRe: Connecting from ASP.Net to MySql Pin
Morten Abrahamsen24-Oct-02 19:48
Morten Abrahamsen24-Oct-02 19:48 
GeneralRe: Connecting from ASP.Net to MySql Pin
Smitha Nishant24-Oct-02 23:05
protectorSmitha Nishant24-Oct-02 23:05 
GeneralInstalling an Excel Driver Pin
José Luis Sogorb22-Oct-02 23:47
José Luis Sogorb22-Oct-02 23:47 
GeneralRe: Installing an Excel Driver Pin
Paul Riley23-Oct-02 0:31
Paul Riley23-Oct-02 0:31 
GeneralRe: Installing an Excel Driver Pin
José Luis Sogorb23-Oct-02 6:54
José Luis Sogorb23-Oct-02 6:54 
GeneralRe: Installing an Excel Driver Pin
Paul Riley23-Oct-02 7:36
Paul Riley23-Oct-02 7:36 
GeneralNeed help to write stored procedure Pin
Mazdak22-Oct-02 20:47
Mazdak22-Oct-02 20:47 
GeneralRe: Need help to write stored procedure Pin
Rein Hillmann22-Oct-02 21:12
Rein Hillmann22-Oct-02 21:12 
GeneralRe: Need help to write stored procedure Pin
Mazdak23-Oct-02 3:34
Mazdak23-Oct-02 3:34 
GeneralRe: Need help to write stored procedure Pin
Richard Deeming22-Oct-02 23:17
mveRichard Deeming22-Oct-02 23:17 
GeneralRe: Need help to write stored procedure Pin
Mazdak23-Oct-02 3:33
Mazdak23-Oct-02 3:33 
QuestionAutomatic Import? Pin
Robby22-Oct-02 10:27
Robby22-Oct-02 10:27 
AnswerRe: Automatic Import? Pin
Richard Deeming22-Oct-02 23:21
mveRichard Deeming22-Oct-02 23:21 
AnswerRe: Automatic Import? Pin
Richard Deeming23-Oct-02 4:27
mveRichard Deeming23-Oct-02 4:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.