Keywords - Auto Suggest Table

  • Do you have a unique constraint on that column / columns? No need to have an ID field. The unique constraint will handle that, so that you have only one distinct record. No need to have duplicates, that only wastes space and time for what you want.

    Then you can have an index on the other column, if you do not include it in the unique constraint. That will speed up the query.

    Andrew SQLDBA

  • I just noticed that the column name of "Successful", that should be a bit data type, not text. A database will have better performance using a numeric value for that column, instead of having to compare text a value.

    You can also completely for go this method, and query thru the actual data table as the person is typing the word. If you are using SQL FullText Search, this will be simple.

    Andrew SQLDBA

  • hi andrew thanks for your reply.

    i don't have unique constraint on that table, just the id field.

    and my apologies, i was not able to clarify the 'successful' column. it's a bit data type. it's either ticked or unticked checkbox

  • Ok, in the database, that column will store either a 1 or a 0

    Query the table, not open the table, and you will see them

    Andrew SQLDBA

Viewing 4 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply