Avatar of Starr Duskk
Starr Duskk
Flag 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!
Microsoft SQL ServerASP.NETSQL

Avatar of undefined
Last Comment
Starr Duskk

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Pavel Celba

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
David Johnson, CD

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)
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.
Pavel Celba

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.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Starr Duskk

ASKER
Thanks pcelba! With your advice, we were able to make it work. Great answer!