Tracking/Reporting Record Hits.

Feb 7, 2008

I am serving ad-units. In each ad-unit I show somewhere between 3 and 10 article headline. I track the headline impressions to get an idea of the headline click through rate. I save the output from the stats process in another table. I am currently evaluating the stats every hour, and then truncating the table every night at midnight. The problem is that I get lots of impressions and the database gets bogged down evaluating the data such as...
SELECT COUNT FROM articleimpressions WHERE articleid = x

But the issue isn't the reporting of the data...so much as it's the capture. I had to add caching on the ad-server because the database couldn't handle the number of inserts.

I thought about parsing the web server log files the next day, but the file sizes seem to be too large, and I can't process them all in one day. (At least not on the hardware that I am using.)

I've thought about splitting log files by hour, but was wondering if there may be a more "native" solution within SQL Server? Maybe a trigger, and/or multi-threaded SP that fires and forgets an insert statement to a linked server. But performance is the key here.

Thoughts?

View 2 Replies


ADVERTISEMENT

Tracking Record Lineage, Family, Etc.

Nov 3, 2007

Say for example, that I have a fairly complicated record of a thingmeant for the US market. Then, a Canadian version is created based onthe US one with a few changes so I want to track the connection. It isfairly easy to make a ParentID field that would indicate the Canadianthing descended from the US thing.But, if I then make a British thing from the Canadian one (and I wantto do this because the Canadian one is a closer match to what theBritish one needs to be), it becomes more complicated... I can put theID of the Canadian one in the ParentId field of the British one. Butthen I need to run multiple queries to build the complete lineage backto the original US record.More so, if I want to allow n-number of levels to the relationshipsbetween these things, it becomes even more difficult.This type of issue has come up repeatedly in my work, so I assume itis not a new problem and that there may be a "best practice" forhandling it.Can anyone offer any advice, an answer, or point me toward a placewhere I may find the answer?Thanks in advance!

View 4 Replies View Related

Retrieve Even If No Hits?

Apr 29, 2005

Hello!

is it possible to have the count(*) to display 0 when there is no matching hits for that n_id?

my query looks like this but only displays the n_id and it's respective count(*) when count(*) is more than 0...

select n_id, count(*) from tblTable
where nSomething > nSomethingElse AND nSomething IS NOT NULL
group by n_id

any idaes?

View 1 Replies View Related

When DTS Hits A Bad Date

Aug 24, 2006

This routine works in most cases, but fails when a bad date is enteredsuch as:19910631 -- there is no June 31st.Instead of ignoring the bad date the entire DTS job fails. Obviouslythis is something that should be validated at data entry, butunfortunately the only control I have is when appending to the tablewith these data quirks. Any suggestions appreciated!!!'************************************************* *********************' Visual Basic Transformation Script' Copy each source column to the' destination column'************************************************* ***********************Function Main()'DTSDestination("Col002") = DTSSource("Col002")if DTSSource("Col002") = "99999999" or DTSSource("Col002") =Null thenMain = DTSTransforStat_SkipRowelseDTSDestination("Col002") = mid(DTSSource("Col002"),1,4) & "/"&mid(DTSSource("Col002"),5,2) & "/" & mid(DTSSource("Col002"),7,2)End ifMain = DTSTransformStat_OKEnd FunctionRBollinger

View 3 Replies View Related

Updating Hits Without Looping

Sep 6, 2007

Hi.
This is my first attempt at a using stored procedures and I'm a bit confused.
I'm trying to follow as many best practices as I can to improve speed, security and scalability. However, I can't find a solution to what I think should be a simple problem.
I have a search page where users enter the criteria of properties they are interested in (bedrooms, price etc...). That takes them to a results page where the properties are displayed.
The problem is that I want the amount of times each property has been shown on the results page to be tracked so the property owner gets statistics.
The property details are all held in a single table along with the amount of times each property has be shown:
Table Name:   zk_Property_USA




ID
INT


User_ID
INT


Property_Type
TINYINT


Market_Status
TINYINT


Price
INT


Bedrooms
TINYINT


Address_State
VARCHAR


Address_Location
VARCHAR


Property_Description
VARCHAR


Searched
INT
0

Contacted
INT
0
I'm trying to find a way to SELECT all the property details to be returned to my results page and UPDATE the "Searched" field by 1 without re-scanning the table for the UPDATE.
Is there a way to update "Searched" at the time when the record is chosen to be a result? I am using SQL Server 2005 and Visual Basic ASP.NET 2.0.
Many Thanks

View 4 Replies View Related

Monitoring Database Hits

Nov 8, 2007

In any asp.net application, whats the simplest way to monitor how many times a page hits the database (opens and closes a connection)? 

View 1 Replies View Related

Lookup With Multiple Hits

Sep 27, 2007

In a Lookup component I've defined a SQL query which returns a sorted resultset. For each Lookup component input row I want to have a single output row. Problem is that for each input row there is possibility of multiple matches in SQL query resultset. From all of the possible multiple hits I want only the first one to be returned, and if no match is found then no output row. How to implement this?

View 10 Replies View Related

Hits Table And Counter Reports

Jan 22, 2008

Using MSSQL (pre 2005):
I have a Link table:
int id (primary key/identity)
varchar(50) linkName
varchar(255) linkHref
//some other stuff
and my Hits table:
int id (primary key/identity)
int linkId (foreign key to Link)
datetime dateCreated
//some other stuff
Hits gets an insert whenever a link is clicked.  (All this works just fine)
I'm trying to create a report that shows each link by its name and href, a counter and the last date each link was visited.  What I currently have is an accurate listing for those that have been clicked on, but it does not show anything for links that haven't been clicked on.  Any suggestions as to how I can modify the following SQL to return "0" and "never" (or DBNULL) if no entries are found in Hits that have the same id?  Or do I have to do this in a couple queries?
SELECT COUNT(h.id) as counter, MAX(h.dateCreated) as lastVisited,
l.id as id, l.linkName as linkName, l.linkHref as linkHref
FROM Link as l INNER JOIN Hits as h ON l.id=h.moduleId
GROUP BY l.linkName, l.id, l.linkHref
 

View 6 Replies View Related

Getting Estimated Total Hits Of Fulltextsearch

Apr 20, 2006

Hello,
i am making a Fulltextsearch on MS SQL Server 2005 (indexed, with "Contains").
Because of performance reasons i am only showing the first 200 rows mssql finds ("select top 200...:").
Is there any possibility to get the estimated totalnumber of all rows? i have heard something that is possible to get this in mssql-server. The server then estimates how many rows with that searchword could be in the whole database. google i.e. makes the same thing....
is that true? what do i have to do to get this?
greetings and thx
cpt.oneeye
 

View 1 Replies View Related

Capturing Client Logins And Hits

Apr 1, 2002

I'd like to capture the avg. # of user logins and # db hits per a 5 interval for a weeks time. I'm guessing there are sys tables containing this info. and by using temporary tables and/or creating/modifying SPROCS this info. can be retrieved. If I'm on the right track, a little direction would be very appreciated. If I'm not on track, please assist this rookie dba.

Thank you,
Eoin

View 2 Replies View Related

Sort Results By Number Of Hits

Jul 23, 2005

In MSSQL, is there a way to count the number of instances of asubstring within a string, so that I can sort by that?For example:table tst contains one column: tst_dataif tst_data = "the man with the plan"I'd want a function that counts the occurances of "the"count_substring(tst_data,'the') = 2Basically, I'm making a search engine and I'd like to put the mostrelavent hits at the top of the page.

View 2 Replies View Related

Need Clever Way To Count Outside Hits In Sql Table

Dec 19, 2007

hi . would greatly appreciate a clever way to make an internal "counter" on an sql table that contains 6000 articles.(one in each row). these are being accessed from a web page and i would like to know which are the most read ones. so i thought of adding a column that would in some way count each time that the row is being accessed. is there a way for this to be done?? please be detailed since i am quite new to all this.
thanks beforehands.

View 3 Replies View Related

How To Handle Users Hits To Single Table

Feb 4, 2008

Hello friends

I am new to SQL database design.I am having a table name customerletter_master in which all details of customer letters are saved.At a time i.e in single second around 200- 400 entry are made in customerletter_master table. Hits to customerletter_master table are more.

Following fields are used in customerletter_master – CID (autogen number), letterno(primary key),consignee, consignor, letterstatus1, letterstatus2, letterstatus3, POD, and some more fields. When letter passes to different stages letterstatus1 is filled to yes and then letterstatus2 and letterstatus3 are filled according to passage of letter.

And at same time many user can accesses the customerletter_master table to search any letter according to letterno. Therefore customerletter_master is used to enter data and to search data at same time and there can be more than 200-400 users doing add and search records to and from customerletter_master

how should i design this table. What should i use to enter and search record and minimize the table hits made by the user at same time. Should i use store procedures or any other method to add and search record. Plz help me out by giving some example.

View 1 Replies View Related

Transact SQL :: Query To Get Web Page Hits On Website

Sep 24, 2015

I'm trying to piece together some code on how to find members of our organization who have visited our website.

View 2 Replies View Related

Multiple Database Hits Vs Bulk Data Parameters

Apr 11, 2006

I was curious to know if it the amount of data sent to the sql server mattered.

I am working on a web application and I have three stored procedures that most likely will be called one after the other. Each procedure accepts at least 4 parameters. Instead if I create one stored procedure, then I will be passing at least 12 parameters. Some of the parameters could be quite bulky(at least 1000 characters).

So which one is better, 1 stored procedure with 12 parameters or 3 stored procedures with 4 parameters each called one after the other.

Thanks

View 1 Replies View Related

How To Get Last Record In A Field In Reporting..

Dec 3, 2007



I am converting a crystal report to a SQL 2000 reporting services..

Now in on field there is a formula. :




Code Block
If OnLastRecord and {al_work;1.Pot} = 0





also another line




Code Blockif next({al_GetSchedDoneWork;1.Pot}) <> 0





Now i cant find its equivalent in SSRS .. In Crystal Reports OnLastRecord means "last record of the field" , BOOLEAN TRUE and next means "next field"

How do i imitate this in SSRS 2000

THIS IS NOT IN A DATASET.. its in a Field formula. al_work is a SP from us, pot is a field in our DB

View 1 Replies View Related

How To Fetch The Data Which Is Not The First Or Last Record From DB By Reporting Service?

Aug 6, 2007



I only found first or last function which means I can't show the data of others, is there any solution to solve this issue?

Thanks in advance.

View 4 Replies View Related

Reporting Services :: Print All Record In SSRS

Sep 13, 2015

We have a SSRS with SP 2010, We need to add one more Print All button which print all the records.

Without impacting the by default Print button which print record page by page

View 3 Replies View Related

Reporting Services :: Add Horizontal Line After Each Record?

Apr 21, 2015

I have 10 records seperated by ID. I m using List in SSRS to show data on report. I need to add horizontal line after first record, then after second record till 10 th record. How do we add this line?

View 4 Replies View Related

Nested CASE WHEN - Create A Field To Show If Measure Hits Threshold Or Not To Be Later Picked Up In SSRS

Oct 28, 2015

I am trying to script a case when to achieve the following.

I have a table of measures with certain threshold. The threshold direction can either be > or < so I want to create a field that shows if the measure hits that threshold or not to be later picked up in SSRS. So a nested case when?

CASE WHEN M.[Threshold Direction] = '>' THEN
CASE WHEN A.[Value] > M.[Threshold] THEN 'GREEN'
CASE WHEN A.[Value] < M.[Threshold] THEN 'RED'
ELSE ''
END END END AS 'Condition'Is this at all possible?

View 2 Replies View Related

Reporting Services :: How To Delete A Single Record From 2 Tables At A Time

May 26, 2015

How to delete a single  record from 2 tables at a time.

View 3 Replies View Related

Reporting Services :: SSRS Record Counts For Group Item

Aug 11, 2015

I have a table where I am grouping on one field and would like an individual (separate) count of values from another field of same table.  So for example, I have following data:

instance_id,  area,        values
101              North       1
102              North       2
103             East          2
104             East          2

I would like to report on Area, and count of rows with different Values types, for example:

Area                            Value - 1,    Value - 2,  Value - 3
North                                 1               1              0
East                                   0             2                0

I am not sure what the technical term is for such report, but I can group by Area column, and but its aggregating counts on different Value types that I am having difficulty in performing in SSRS.

View 2 Replies View Related

Reporting Services :: Report Builder 3.0 - Display Next Record / Value In Next Column On Same Row

Nov 17, 2015

For my report I am trying to display images that are pulled from a database. Images are from separate records. I have the records I need in a dataset and now I want to set a Table Cell value to the field corresponding to the image. However, the next images/(records) are displayed on the next row (as expected i guess). How do I set the the records/values to be displayed across a single row?

What I have:
image1|
image2|
image3|

What i want: 
image1|image2|image3|etc...

View 3 Replies View Related

Reporting Services :: Open URL In SSRS Report In New Window While URLs Keep Changing In Every Record

Jun 29, 2015

I want to be able to open URLs in a new window in my SSRS report, and the URLs keep changing in every record. The problem is these links are not the only things present in the record, and there is other data present. I keep seeing examples where they are considering only a link to be present in the record with no other data.

Also the data in the record includes HTML tags and I checked the option that says "HTML - Interpret HTML tags as styles" on the placeholder properties window.

Example of data in the record:
Hello! Welcome to google, the most used search engine.
Click on www.google.com to go the website

So when I click on the www.google.com URL, it should open in a new window. 

View 2 Replies View Related

Tracking Changes

Sep 26, 2003

Please Help.

How do you track changes to objects in SQL Server.
For example changes in stored procedure,views and indexes. What system table or column track or indicate changes in text of sp or views.
Help appreciated.


Regards

View 6 Replies View Related

Tracking Who Is Doing What?

Aug 9, 2006

We are building an inventory management system complete with BOM. It is important to track what employee is updating what tables. Currently all such tables have a Date field that is updated when a change is made, and an EmployeeID field which records the employee making the change. I am wondering if someone knows of a better way to track this information. Any suggestions?

View 2 Replies View Related

Tracking

Aug 26, 2004

Hi,

I am trying to create a tracking spreadsheet for my SQL Servers in order to keep track of every thing.

Here is a example of what I have:

DateTracking IDServerIssuesSolution

8/26/20046760FORMSCAPEDOCSBackup failSwitch Transaction logs to the D: and left the database backup on the E:

Should I be more detailed and add some more fields and if yes can you recommend some.

Thanks

View 2 Replies View Related

SQL Tracking

Mar 6, 2006

I have an application that uses SQL server. Is there a way to find out what SQL statements the application is passing to the SQL server?

I would like to know all kinds of activities going on in the background of the application. I am sure there is a way.

Thanks in advance.

View 11 Replies View Related

Tracking

Jul 20, 2005

OK. For DDL, please refer to the classical Northwind ORDERS table,problem/challenge, find the longest duration (start_date andend_date), during which, no orders were placed.FYI, column names by the order of colid per syscolumns:OrderIDCustomerIDEmployeeIDOrderDateRequiredDateShippedDateShipViaFreightShipNameShipAddressShipCityShipRegionShipPostalCodeShipCountryAny idea/approach? TIA.

View 1 Replies View Related

CDC Not Tracking Changes

Sep 5, 2007

Hi
I'm trying to get CDC going, it works however when i query the LSN using the functions i get no changes. The min and max LSN returns null. SQL agent is running, db is on full recovery model etc.

any ideas ?

thanks

View 4 Replies View Related

Sp Tracking.

Dec 19, 2007

Yesterday I had problem with that a sp that contained join that the developer had forgotten the where part. The sp join very large tables and sp took more 95% dual itanium processor. How do fastest track this down when it accrues. Find the sp or sql that running and consume this much processor resources. I tried with a lot. Sp_who, sp_who2, activity monitor.

View 5 Replies View Related

I/O Tracking For A Sql Table?

Jun 16, 2004

I'm looking for a way to monitor I/O(select, delete, & updates) to a particular SQL Table for a period of time. Any suggestions?

View 3 Replies View Related

Tracking Old New Values

Mar 7, 2006

im trying to create a procedure that will insert/update a small table
that has an ID, AmtBefore & AmtAfter.

this is just a table that i'd be using to monitor other activity on the database.

i'm really pulling a price + ID every hour and i need to track that somehow and know when the procedure runs if a price is lower than it was the last hour, plus of course keep the ID's straight.
does anyone have a good approach to something like this?

thanks for any help on this
rik

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved