Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Indexing of binary and varbinary
Hi

I’m writing an Alarms and Events database. Our A&E is identified by a byte
array in the A&E object.  This byte array I will store in a column of a tabl
e
in addition to other columns with other relevant data.

I’m thinking of using the binary or varbinary type for the purpose of
storing the byte array.

I also need to have an index on the varbinary field, -is that possible?

This field will identify an instance of a specific alarm and will be used to
calculate statistics regarding how often the alarm occurs etc.

Is possible to do SELECT on a varbinary, and if so is it more resource
demanding compared to do this with a string on the same size? (Another
possibility is to convert the byte array to a hex string).

SELECT BinId FROM Events WHERE BinId like @IdFromEvent
ORDER BY BinId

Regards
Kjell Arne

Report this thread to moderator Post Follow-up to this message
Old Post
Kjell Arne Johansen
12-14-06 12:12 AM


RE: Indexing of binary and varbinary
Hi

You can index varbinary columns,  but if you are going to always divide this
into individual bytes and want to mainly access these separately then you
would probably be better off holding them separately, expecially if you want
to index them separately. If the bytes represent characters then you should
hold them in char columns if they are numeric or binary they should be
numeric or binary.

HTH

John


"Kjell Arne Johansen" wrote:

> Hi
>
> I’m writing an Alarms and Events database. Our A&E is identified by a by
te
> array in the A&E object.  This byte array I will store in a column of a ta
ble
> in addition to other columns with other relevant data.
>
> I’m thinking of using the binary or varbinary type for the purpose of
> storing the byte array.
>
> I also need to have an index on the varbinary field, -is that possible?
>
> This field will identify an instance of a specific alarm and will be used 
to
> calculate statistics regarding how often the alarm occurs etc.
>
> Is possible to do SELECT on a varbinary, and if so is it more resource
> demanding compared to do this with a string on the same size? (Another
> possibility is to convert the byte array to a hex string).
>
> SELECT BinId FROM Events WHERE BinId like @IdFromEvent
> ORDER BY BinId
>
> Regards
> Kjell Arne

Report this thread to moderator Post Follow-up to this message
Old Post
John Bell
12-14-06 12:12 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 09:25 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006