SPSiteDataQuery & CrossListQueryInfo

I was about to write an article to explain SPSiteDataQuery & CrossListQueryInfo,When I came across this well written article.
Here is the snippet

SPSiteDataQuery :
    string lists = "";
    string viewFields = "";
    string webs = "";
    SPSiteDataQuery siteQuery = new SPSiteDataQuery();
    siteQuery.Lists = lists;
    siteQuery.ViewFields = viewFields;
    siteQuery.Webs = webs;
    results = SPContext.Current.Web.GetSiteData(siteQuery);

This query returns the title of all items in Issue lists in all sites in the current site collection.If you are running Microsoft Office SharePoint Servers, you can also use the CrossListQueryInfo object to query for content. The advantage is that SharePoint has a caching mechanism for the queries that you run. By using CrossListQueryInfo, your webpart will use this caching mechanism. And you can also make use of audience targeting.

CrossListQueryInfo:

    string lists = "";
    string viewFields = "";
    string webs = "";
    CrossListQueryInfo query = new CrossListQueryInfo();
    query.RowLimit = 100;
    query.WebUrl = SPContext.Current.Site.ServerRelativeUrl;
    query.Lists = lists;
    query.Webs = webs;
    query.Query = "";
    query.ViewFields = viewFields;
    CrossListQueryCache cache = new CrossListQueryCache(query);
    results = cache.GetSiteData(SPContext.Current.Site);

Click here for complete article.

Following is a description for the available types (available in the WSS SDK)

Type:

Value Description

100 Generic list

101 Document library

102 Survey

103 Links list

104 Announcements list

105 Contacts list

106 Events list

107 Tasks list

108 Discussion board

109 Picture library

110 Data sources

111 Site template gallery

113 Web Part gallery

114 List template gallery

115 XML Form library

120 Custom grid for a list

200 Meeting Series list

201 Meeting Agenda list

202 Meeting Attendees list

204 Meeting Decisions list

207 Meeting Objectives list

210 Meeting text box

211 Meeting Things To Bring list

212 Meeting Workspace Pages list

300 Portal Sites list.

1100 Issue tracking

2002 Personal document library

2003 Private document library

BaseType

0 — Custom List

1 — Document Library

2 — Not used

3 — Discussion Forum

4 — Surveys

5 — Issues List

so, if you are developing custom picture library set Type="109" and BaseType="1" (because picture library mainly based on document library)