I have a web app that creates a DataContext at the beginning of the request and lets go at the end.
I would like to have some handy stats for each page like
- number of inserts and time spent
- number of deletes and time spent
- number of updates and time spent
- number of selects and time spent
I have it all set for inserts/updates/de...
I have some sqlite querys that are slowding my iPhone App.
I have 2 pattern that I repeat in my app. The first is with substr:
SELECT Id FROM [Table] WHERE UPPER(substr(Name,1,1))='A' ORDER BY Name"
(This run for the mayority of the alphabet. Is for a contact list)
The other is a complex one with date:
SELECT Id,customerCode,
case...
Let's say I have two entities: Event and Activity
An Event is something that happens at (seemingly) random times, like Sunrise, Sunset, Storm, Fog, etc.
I have a table for this:
create table Event (
eventKey int,
eventDesc varchar(100),
started datetime
)
EventKey | EventDesc | Started
1 "Sunset" 2009-07-03 6:51pm
...
Hi folks.
I'm working with WPF and I'm developing a complex usercontrol, which is composed of a tree with rich functionality etc.
For this purpose I used a View-Model design pattern, because some operations couldn't be achieved directly in WPF. So I take the IHierarchyItem (which is a node and pass it to this constructor to create a tree...
I want to create a table of friends with personal information and log on details.
What better to separate the members table to 2 tables ,
one contain minimal details ,
second with Other details.
or remain in one table ?
i have a lot of tables that contain the foreign key of the member.
...
I need to load a model, existing of +/- 20 tables from the database with Entity Framework.
So there are probably a few ways of doing this:
Use one huge Include call
Use many Includes calls while manually iterating the model
Use many IsLoaded and Load calls
Here's what happens with the 2 options
EF creates a HUGE query, puts a very...
[EDIT]
The new Reactive Framework solves the problem outlined below, using the System.Linq.EnumerableEx.MemoizeAll() extension method.
Internally, MemoizeAll() uses a System.Linq.EnumerableEx.MemoizeAllEnumerable<T> (found in the System.Interactive assembly), which is similar to my ThreadSafeCachedEnumerable<T> (sorta).
Here's an awfu...
I work in the maintenance team of a big project (around 7k+ classes) and my daily work is mainly to fix bugs. Sometimes, though, I have no bugs to work in. When this happens, I spent most of the time looking for performance gaps in the code. The fact that I have more than 7 thousand classes to look in means it's not obvious to find these...
In SQL Server (2005+) I need to index a column (exact matches only) that is nvarchar(2000+). What is the most scalable, performant way to approach this?
In SQL Server (2005+), what would be the practical difference in indexing on a column with the following types:
nvarchar(2000)
char(40)
binary(16)
E.g. would a lookup against an ind...
I have the following code which reads in the follow file, append a \r\n to the end of each line and puts the result in a string buffer:
public InputStream getInputStream() throws Exception {
StringBuffer holder = new StringBuffer();
try{
FileInputStream reader = new FileInputStream(inputPath);
BufferedReader br = new Buffe...
To check for odd and even integer, is the lowest bit checking more efficient than using the modulo?
>>> def isodd(num):
return num & 1 and True or False
>>> isodd(10)
False
>>> isodd(9)
True
...
So I had an architect on a previous project who railed against Datasets. He hated them, and said they had no place in a web application, specifically a web app which will have a lot of traffic.
I've noticed in many instances of code I've taken over that Datasets are used quite heavily.
Are they really that bad/performance killing?
Sh...
I know that writing to a volatile variable flushes it from the memory of all the cpus, however I want to know if reads to a volatile variable are as fast as normal reads?
Can volatile variables ever be placed in the cpu cache or is it always fetched from the main memory?
...
Hi all,
I have created a website and want to test its perfomance and load test if 1000 users try to accesc it. I also have to know about the amount of memory it takes to store the sessions.
Which is the best freeware tool I can use?
...
can anyone suggest Jobs that will improve database availablity and performance in sql server 2008?
...
Hello
I'm developing an ASP.NET (3.5) webservice application, hosted on IIS6/Win2003. The webservice logs the timestamp of the call at start and just before the return. This allows me to query the time-taken. I've also added time-taken to the standard IIS log (W3C extended)
The webservice is then stress-tested (5 threads, 200 calls per...
Hey all,
I built a custom forum for my site using MySQL. The listing page is essentially a table with the following columns: Topic, Last Updated, and # Replies.
The DB table has the following columns:
id
name
body
date
topic_id
email
A topic has the topic_id of "0", and replies have the topic_id of their parent topic.
SELECT SQL_CA...
Howdy peeps.
I hope you can help me with this one. I got a twitter service ( http://foller.me ) which is about to be updated to public beta 2, but I don't want to do this until I could give the pages out in at least 2 or 3 seconds. The current version is simple enough, but the dev version I'm working on is quite complex.
It's all about...
I was wondering if returning a list, instead of returning a pointer to one, was costly in term of performance because if I recall, a list doesn't have a lot of attributes (isn't it something like 3 pointers? One for the current position, one for the beginning and one for the end?).
...
Until recently I'd considered myself to be a pretty good web programmer (coming up for 10yrs commercial experience on a variety of e-commerce, static and enterprise applications). I'm self taught and have always used the Microsoft product stack (ASP, ASP.NET)...
My applications are always functional, relatively bug free, but have never...