I recently caught up with a friend whom I hadn’t talked to in awhile. We had usually chatted on IM with Yahoo or AIM and had been doing that for years. Both of our lives had gotten busy with kids and work, so we had switched to email. Even that had slowed down though as we got busier and busier. With the new year upon us, I took it as a chance to renew old friendship and emailed her.
She’s an avid scrapbooker and she and her friends had all switched to GTalk and GMail. She sent me an invitation to GMail and that is where we have been chatting. After the first day, I went back to a logged chat with her. I needed a web site link that she had sent me. What a discovered was a little disturbing.
She is the only person that I have talked to on GTalk and the only email on Gmail that I have received is from her. In both email and chats we naturally talked about scrapbooking. It is her passion as is her son. What discovered were the ads listed on the right side of the screen. Ads that were superficially and narrowly targeted to scrapbooking.
As I have posted about in the past, I understand the dilemma of what data to collect and how to use it. After all, if I have to see ads I want to see those that would at least be of interest or use to me. What was bothersome though is where the data came from. I had created a brand new blank account for Gmail/GTalk. I give Google credit as there were no survey’s or forms that requested personal data. I now see why. To get me target so tightly like that, they had to have scanned and indexed either or both my email and chat. Remember I had only used this account for a day and only with my friend the scrapbooker. Here is what Google says in their FAQ about saved chat logs
As with all major IM services, Google Talk will collect certain log information created in the course of a conversation. This information is for Google’s internal use only, to maintain statistics on usage and to improve our service and the user experience. We do not permanently store any personally-identifying information in the Google Talk logs. Google Talk FAQ
Google does mention targeted ads in their description of GMail
Are there ads in Gmail?
Yes, there are small, unobtrusive, and relevant text ads alongside your Gmail messages, similar to those on the side of Google search results pages. The matching of ads to content is a completely automated process performed by computers. No humans read your email to target the ads, and no email content or other personally identifiable information is ever provided to advertisers.
Again, to Google’s credit, they have at least documented this. But just like the pay-per-post discussion does this make it right? After the loss of data by AOL last year, do we know what is and is not being recorded here? Its great that they might be of interest and relevance to me and that particular conversation, but at what cost?
Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
The buzz about attention data has come up again and here with Google Reader announcing its trends feature. Should your data be your own or owned by the company that is providing the free service? It is a tough question. One that I have been on both sides of the coin and thought long and hard about. Its a free service and the price you pay might be your attention data and eventual ads targeted very specifically for you. On the other hand, it is my data and it is about me. I wouldn’t want my medical history shared. Why should my reading habits and interests be a whole lot different?
Who ever owns the data is not what I am getting at. If it is data about me why can’t I use it the way I want to? Nick and Google Reader team, et al. In my news reader you are collecting data about me and data about others, why can’t this data be culled to do recommendations? I shop Amazon, specifically for this reason. I love finding out new books and products that are geared towards me and my interests. Why can’t blogs and websites be the same way?
Google is a great web search tool, but this is “Web 2.0″. We are beyond simple searches. Social web sites are nice, but can be skewed and played. What I want is simple statistical recommendations not just search. What blogs and sites are like those that I have interest in? Based upon what I am reading now, what other topics might be of interest? What are others like myself looking at? These are the things that would be useful and more in line with the digital lifestyle.
The data is there and has been for a long time. Let’s do something with it that enhances the users experience. The marketers have had their shot with it and they missed the boat hard. It’s the users turn now.
Technorati Tags: Google Reader, Feed Demon, Attention Data, User Experience, Web 2.0
Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Ado as a technology offers a lot of usefulness. It can help you manage concur connections. Lock records; ease inserting, manipulating, and deleting individual records; and overall manage database manipulation. It tries to provide a layer of abstraction between the developer/application and the database/database provider. It accomplishes this goal fairly well. Unfortunately though, it comes at a price: performance. To understand how to improve performance, we need to understand the basics of how ADO works.
ADO does a lot behind the scene. First it must be able to communicate with your database provider. To do this it has to translate all of your ADO commands into its SQL specific counter parts. There is no getting around this. But it is additional layer that needs to be accounted for. This isn’t the biggest hit in performance though. What is the foundation of how ADO works; Record sets.
Record sets are the result of your SQL command, the records that get returned. ADO returns all of the records you asked for in one big lump and loads it into memory. Memory is cheap and memory operations are fast, but the overhead of managing large amounts of data this way is costly. Operations such as sort, find, and filter can be huge if the data is as well. These commands and others are done on the client side and on the entire record set.
Transferring that large amount of data can be part of the overhead as well. Traditional client/server databases can handle this, but if you are using access which uses a file connection this can pull an application to its knees.
By default when you open up a generic ADO connection, it opens and returns the whole table. Depending upon the table this can be a long and resource intensive operation. The best way to handle these performance issues are to follow these simple steps to improve your performance.
Steps to improve ADO and query performance:
- Use the .command method. This will give you greater control over what you bring over. By limiting the amount of data to what you just need, you save network bandwidth, client memory, and client CPU time. Let the database engine do the work for you.
- Use the where clause in your SQL command. Again this goes along with #1.
- Don’t use Select * in your SQL command. Using column names gives lets you specify the order that columns get returned in. You can change the names of the columns. You don’t have to fumble with ADOx to figure out the column names (giving your code that much more readability). Finally, if the database is changed and a columns get added you aren’t suddenly faced with a degrade in performance because the added extra data is being brought over.
- Do all of your sorting, grouping, and aggregates (Min, max, sum, count, distinct, …) in your SQL command. The database is designed and optimized to do these functions. Let it do it for you.
- Be smart with your queries. Know your data and look at your most used queries and optimize them against your existing indexes and add indexes where you need them.
I followed these steps with a customer’s existing Access database and saved them from rewriting the entire application. It sped up the application from opening up this one screen in 3 min to 20 seconds. That was before optimizing the queries too.
What other tips and tricks do you have for speeding up an ADO connection/query?
Technorati Tags: MS Access, SQL, ADO, performance, databases, queries, development
Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.