Wednesday, 24 February 2010

Subaru Parts

I like to shop around for parts. For quality I'll only go with OEM or a recognized aftermarket brand. When it comes to filters oil, fuel WIX is a well known company that makes an excellent product.
What some people may not know is that NAPA Gold parts are just re-badged WIX products.
Here's an example using some common filters on a 2002 Subaru WRX (the apply on most WRX's from the 90's - 2006 as well as SAABurus 05-06)
Oil Filter - NAPA Gold - 1365 (WIX# 51365)
Fuel Filter - NAPA Gold - 3558 (WIX #33558)
Cabin Air Filter - NAPA Gold - 4485 (WIX #24485)

So there you go, now you know you can pick up a quality WIX filter locally nearly anywhere in North America. :)

Thursday, 4 February 2010

SQL Code: Object Location Within Data Files

I'm doing a lot of playing around with different numbers of data files and performance right now and in doing that I'm moving data around files and filegroups alot.
One of the things I find maddening is when I *think* I've moved all the data only to find that a filegroup still isn't empty. You check tables, indexes, indexed views, heaps, all look like they're in the right spot. That's why I wrote the query below. It will show exactly what data is where in your database. It's helpful for tracking down LOB_DATA that doesn't move with the rest of your table data :)

OBJECT_NAME(object_id) AS obj_name
, AS [file_name]
FROM sys.partitions p
JOIN sys.allocation_units au
ON p.partition_id = au.container_id
JOIN sys.master_files mf
ON au.data_space_id = mf.data_space_id
AND mf.database_id = DB_ID()
ORDER BY obj_name, au.data_space_id;