Hi All, I currently have a problem with two tables in SQL Server 2005. The tables have grown very large and sometimes lock up when small amounts of data are requested from them. The current record count is 9731495(PrintMedia) on the one table and 4126084(PrintArticles) on the other one. Table names: PrintArticles and PrintMedia. Whats worse is that these two tables are joined on each other in sql queries. This is because the database is non-relational. So joins are used to substitute for foreign keys. The performance needs to be improved. The SQL server version is 2005 standard edition - So partitioning is not possible :( Here is a breakdown of the Tables with their fields, types and Max sizes: PrintArticles: Analysis int NULL width float NULL height float NULL ArtSize float NULL ID (PK) int NULL Cutting text 2147483647 -This field contains on average 3000 characters CutID int NULL NewbaseNo varchar 20 AnalysisApplic int NULL AnalysisUser nvarchar 50 Translations ntext 1073741823 AnalysisApplicDate datetime NULL AnalysisApplicTime nvarchar 5 PerTranslation text 2147483647 PerTranslated int NULL This table also has 3 indexes: 1 clustered on the PK and 2 non clustered PrintMedia PrintID (PK) int NULL CuttID int NULL Graphic int NULL FpageSection int NULL Caption varchar 1000 PDFPath varchar 300 Branch varchar 30 UploadTime varchar 10 AnalysisTag varchar 500 UserID varchar 30 Modifier varchar 30 DateModified varchar 10 PubID int NULL NewBaseArticleNo varchar 20 Edition varchar 800 IS_HardCopy int NULL Seen_by varchar 300 DTPDate varchar 10 ColourPDF int NULL SpokesPerson varchar 200 Mention varchar 200 NLPU int NULL Server varchar 10 Repl text 2147483647 GroupID int NULL ArticleID int NULL PubDate 5 varchar 10 CreatedDate varchar 10 Publication varchar 200 SubPublication varchar 200 Headline varchar 800 SubHeadline varchar 800 Journalist varchar 500 SubJournalist varchar 500 Page varchar 20 Client varchar 50 Category varchar 200 CategoryValue varchar 200 CategoryDisplayName varchar 200 OrderID varchar 5 TagID varchar 5 Language varchar 20 Section varchar 200 CCM real NULL SizeX real NULL SizeY real NULL RandValue real NULL FrontPageCover int NULL This table has 12 non clustered indexes I have to restart the sql server service at least once a day to remove locks. If that fails I have to reorganize the indexes or rebuild them to get the tables working again. The previous developers wrote applications
Jacobus01
Posts
-
Table Optimization Problem - SQL Server -
WPF Datagrid: How to change the DatagridColumnHeadersPresenter's Background propertyHi, Is there any way in which I can change this property without overwriting the entire control template. I've seen this done in some examples but I can't set the template for the DatagridColumnHeadersPresenter in my xaml file. I can access the headers and style them. I'm a bit new to control templates in wpf. Any help would be appreciated.
-
how to pass parameters to an xsd datasetHi, I"m currently designing reports for my company (yeah :( ) and I'm trying to define my datasets using xsd files in VS 2008 design time. I'm creating table adapters and providing the select queries which in turn populates my tables. I need to know if there is a way for me to pass parameters to the queries that I use in those table adapters without having to resort to runtime code (In other words in design-time in the form of a placeholder of some sort) and at a later stage pass that parameter from another class instance. In code you would do: SqlCommand Cmd = ....; SqlParameter par1 = new SqlParameter(); ...//Set all the parameter properties Cmd.Parameters.Add(par1); I'll consider runtime code if it happens in the dataset's code behind file. My reporting solution (XtraReports) works quite well with xsd datasets and designing a report mostly in design time is far less time consuming than doing all the databinding in the code behind. Can anybody plz help? Regards Jacobus
-
Debugging Postgresql plpgsql [modified]What a nightmare... I'm currently writing pl sql for postgresql. I'm not a qualified DBA and pl sql is quite new to me. I've always rather used plain sql/linq and ADO.NET but for this specific problem it is better(I think) to write a stored procedure. The thing is that I can't seem to get debugging to work in postgresql. I'm running postgres v 8.4.(something). Is there a opensource ide that I can use to compile and debug postgresql stored procedures (Currently running dreamcoder and pgadmin III). I need help and google isn't giving me helpful answers. I have a logical error in my procedure and I can't step throught the code. I'm also using unidirect as my dataprovider in VS 2008 but guess what: No design time support for unidirect. Big up to corelab and my idiot boss for deciding on this so everything has to happen @ runtime(So much for RAD). VS 2008 would have allowed me to generate the SP if this worked...Please help me fellow programming mates. What is there to do Regards .Net developer with DB issues
modified on Friday, August 7, 2009 5:44 AM
-
How to derive a DataTable form a WPF DatagridK. It seems to be working :-D
-
How to derive a DataTable form a WPF DatagridYes I used an ObservableCollection<ITenderLineItem> to display my DataSource. The thing is that I'm allowing my user to display certain Items and not others. If I send this collection through to my report, will i be able to create a binding source and set my reports datasource to this collection?
-
How to derive a DataTable form a WPF DatagridHi, I'd like to derive a DataTable instance from my WPF DataGrid. The DataGrid has a list of objects that make up the datasource for the grid. I need to generate a report from the grid's content. The report unfortunately can't use wpf components as the datasource I'm using telerik reporting and need to send the dataTable as a parameter when creating an instance. Is there an easy way to do this? Even if its not a DataTable and rather some other data structure that reflects the Datagrid's content, that would also work. I don't particularly want to program a function to do this if there is an easier way. Thanx
-
DataGrid Bindings not workingOK, This is the XAML for the Datagrid: <my:DataGrid CanUserAddRows="True" RowHeaderWidth="10" CanUserResizeRows="False" Margin="235,344,38,93" RowHeaderStyle="{StaticResource RowHeaderStyle}" ColumnHeaderStyle="{StaticResource ColumnHeaderStyle}" HeadersVisibility="All" Name="TenderDataGrid" ItemsSource="{Binding Path=TenderLineItems}" AutoGenerateColumns="False" ColumnWidth="SizeToHeader" IsReadOnly="False" SelectionChanged="TenderDataGrid_SelectionChanged" CanUserSortColumns="False" SelectionMode="Single" SelectionUnit="CellOrRowHeader" IsSynchronizedWithCurrentItem="True" Background="#FFDDDDDD" BorderBrush="#FFAAAAAA" BorderThickness="3" AlternatingRowBackground="LightBlue"> my:DataGrid.Columns <my:DataGridTextColumn Header="Series" Binding="{Binding Path=Series, Mode=TwoWay}" Width="Auto"></my:DataGridTextColumn> <my:DataGridTextColumn Header="Item No" Binding="{Binding Path=ItemNo, Mode=TwoWay}"></my:DataGridTextColumn> <my:DataGridTextColumn Header="Description" Binding="{Binding Path=Description, Mode=TwoWay}" MinWidth="200"></my:DataGridTextColumn> <my:DataGridTextColumn Header="Unit" Binding="{Binding Path=Unit, Mode=TwoWay}"></my:DataGridTextColumn> <my:DataGridTextColumn Header="Quantity" Binding="{Binding Path=Qty, Mode=TwoWay}"></my:DataGridTextColumn> <!--<my:DataGridTextColumn Width="5000"></my:DataGridTextColumn>--> </my:DataGrid.Columns> </my:DataGrid> (Sorry about the indentation)
-
DataGrid Bindings not workingHi, I'm currently struggling with the WPF Toolkit's DataGrid. Well just one aspect to be more accurate. I am displaying the properties of an object in their own columns on the datagrid and each property is bound to a DatagridTextColumn. But if I add a new column after the object has been instanciated and I bind to another property of the object, the binding doesn't work. The datagrid throws a NullRefferenceException. How can I work around this without having to reinstanciate the object?
-
WPF TabContol problemThank you very much. I'm still new to WPF and I'm still getting used to the new event model. So far I'm quite impressed...
-
TabItem ActivationI Had the same problem and this was unfortunately the only solution I could think of. private void TendererTabControl_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { if (e.AddedItems[0].GetType().Name == "TabItem") { TabItem SelectedTab = (TabItem)e.AddedItems[0]; if (SelectedTab.Header.ToString() == "Tenderers") { ..... } if (SelectedTab.Header.ToString() == "Contenders") { .... } } } catch (IndexOutOfRangeException) { }
-
WPF TabContol problemHi, I have a wpf window containing a Tabcontol with 2 tab items. Both tab items contain a datagrid and some additional buttons and textboxes. I can't seem to find an event for the tab control that only fires when you select the tab item at the top. SelectionChanged fires for any item that I select in the tab item. I need my datagrid to bind to a new datatable whenever its host tab is selected. Please Help!
-
NHibernate - Good or Bad Idea?Hi, My company has now decided that we developers now have to bring in a persistence layer in our applications(mostly c#.net,wpf and ASP.net). Previously I wrote my own entity classes and had a common data class handle all my database transactions. This data class used Corelab's Unidirect to generate sql for a vast multitude of DBs and defined the way in which you are to communicate with the database. Now I have to implement Nhibernate. I've never used it before and apparently it makes our job as developers easier. I do not yet know whether this is the case and so far it has only complicated things. Can anybody tell me if Nhibernate is worth the effort as I don not yet know the product well enough to make a conclusion. The learning curve is messing with my productivity.
-
Relative file path referencing problemWhat about encryption? I dont want my client to see the connection string (or any other party for that matter).
-
Relative file path referencing problemThis is a hard thing to do. I have a solution in visual studio 2008 that contains multiple projects. Some are class libraries, some are web apps and some are win apps. Upon deployment I have no idea where all the apps will be located. They will however contain all their needed dlls in the bin folder. Not exactly sure where the web app will keep its dlls. This DBconnection.sec file contains an encrypted DB connection string. I decided to do this to avoid having to recompile the program if the connection string changes and it needs to be encrypted. Somehow my web application and win application needs to know where this file is located. I have a sub system that allows you to create this file but I'm unsure where to store it. How can I solve this issue and make this file available to both the win apps and web apps?
-
Relative file path referencing problemI need to change the default location that my application uses to reference files relatively. I use the syntax as follows: "..\\DBconnection.sec". This returns: C:\Projects\dotnet\RMS_IMCS\RMS_IMCS_WIN\bin\DBconnection.sec. I need the "bin" folder to be changed to RMS_IMCS. my relative reference needs to look like this: "..\\RMS_IMCS\\RMS_IMCS_WIN\bin\DBconnection.sec". This would allow me to chnage files located in folders outside my project without having to use absolute referencing. Any help?
-
Static class info across multiple application instances?Thank you
-
Static class info across multiple application instances?Can you maybe elaborate on these mechanisms?
-
Static class info across multiple application instances?If I change a static class variable in one application instance and I have multiple instantiated applications using the same dll will I be able to see that specific modification from one of my other applications? I'm thinking yes but I'd like to know for a fact. Any words of wisdom? Thanx
-
How can I keep user permissions and info available across multiple classes? [modified]Simple, yet effective. Thanx. I kept on thinking that I'd have to instantiate an object for this purpose. I even considered running a new thread and just keep the details in an object referenced by that thread. But a static class seems simpler. Regards