ggggus
Programmer
- Jul 5, 2003
- 114
I have a table with about 500,000 records in it, and the table contains manufacturer part numbers. Users need to be able to search the field with the manufacturer part number using partial numbers.
The part number field is indexed and it is a varchar(50) field.
I have been using a statement similar to:
As the database has grown, this search is taking longer and longer. Is there an index type that may speed this type of search up, or a different way of searching that will speed this up?
I'm familiar with fulltext searches, and use it frequently, it will not work in this situation, the part numbers may look something like: 234-x4fd 324-3
Manufacturer part numbers frequently include dashes, periods, spaces, and other non-word characters. Users need to be able to search on things like 34-x4 and have the above example of a part number returned.
***************************************
J. Jacobs
The part number field is indexed and it is a varchar(50) field.
I have been using a statement similar to:
Code:
SELECT * FROM man_pn WHERE pn LIKE '%search_string%';
I'm familiar with fulltext searches, and use it frequently, it will not work in this situation, the part numbers may look something like: 234-x4fd 324-3
Manufacturer part numbers frequently include dashes, periods, spaces, and other non-word characters. Users need to be able to search on things like 34-x4 and have the above example of a part number returned.
***************************************
J. Jacobs