Link to home
Start Free TrialLog in
Avatar of Starr Duskk
Starr DuskkFlag for United States of America

asked on

Searching varbinary field quickly

SQL Server
ASP.NET
I have a varbinary field that stores the content of various documents such as pdfs, docs, csvs, etc.

What is the best method for searching the varbinary field quickly?

Does indexing it help? etc.?

thanks!
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can't you add the properties you want to search on in other areas of the table that point to the varbinary i.e.
products
ID int
data varbinary
author varchar(max)
date datetime
tags varchar(50)
Avatar of Starr Duskk

ASKER

Sorry, yes, I intend to search using a SQL Query, not client side.

We have found we can search these results if the file is csv and return rows, and some pdfs show up, but other pdfs do not find the asked for data.
Some PDFs do not contain text info in open text and/or they can have just image format. In such case you would need OCR to read them which is hard to implement on the SQL Server.
Thanks pcelba! With your advice, we were able to make it work. Great answer!