Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

prefixing indexes Expand / Collapse
Author
Message
Posted Thursday, March 10, 2011 7:53 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, March 10, 2011 9:36 AM
Points: 29, Visits: 92
In MySQL its possible to use index a prefix of a column to aid performance. is there an equivalent in SQL server?
Post #1076261
Posted Thursday, March 10, 2011 8:09 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 7:59 AM
Points: 41,530, Visits: 34,447
Could be computed columns, not sure. Could you explain more what the MySQL feature is?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1076270
Posted Thursday, March 10, 2011 9:40 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, March 10, 2011 9:36 AM
Points: 29, Visits: 92
when creating an index you can filter the index key to read only N number of characters in field e.g abcdefg and not abcdeftgghhjjjjjjjjjjjjjjjjjjjjjjjjjj. I understand that when the field is used in a query there is less of an overhead.
Post #1076364
Posted Thursday, March 10, 2011 10:31 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 7:59 AM
Points: 41,530, Visits: 34,447
To do that in SQL you'd need a computed column on LEFT(other column), then you'd need to filter on that computed column. Not for performance, for when you really are matching on part of the column.


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1076420
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse