Search Results

Search found 113 results on 5 pages for 'sachin chourasiya'.

Page 2/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • postgreSQL - pg_class question

    - by Sachin Chourasiya
    PostgreSQL stores statistics about tables in the system table called pg_class. The query planner accesses this table for every query. These statistics may only be updated using the analyze command. If the analyze command is not run often, the statistics in this table may not be accurate and the query planner may make poor decisions which can degrade system performance. Another strategy is for the query planner to generate these statistics for each query (including selects, inserts, updates, and deletes). This approach would allow the query planner to have the most up-to-date statistics possible. Why postgres always rely on pg_class instead?

    Read the article

  • postgres SQL - pg_class question

    - by Sachin Chourasiya
    PostgreSQL stores statistics about tables in the system table called pg_class. The query planner accesses this table for every query. These statistics may only be updated using the analyze command. If the analyze command is not run often, the statistics in this table may not be accurate and the query planner may make poor decisions which can degrade system performance. Another strategy is for the query planner to generate these statistics for each query (including selects, inserts, updates, and deletes). This approach would allow the query planner to have the most up-to-date statistics possible. Why postgres always rely on pg_class instead?

    Read the article

  • Nested function in C

    - by Sachin Chourasiya
    Can we have a nested function in C? What is the use of nested functions? If they exist in C does there implementation differes from compiler to compiler. Are nested functions allowed in any other language? If yes then what is there significance?

    Read the article

  • ORACLE -1401 error

    - by Sachin Chourasiya
    I have a stored procedure in Oracle 9i which inserts records in a table. The table has a primary key built to ensure duplicte rows doesnot exists. I am trying to insert a record by calling this stored procedure and it works first time properly. I am again trying to insert a duplicate record and expecting unique constraint violation error. But I am getting ORA-01401 inserted value too large for column I knew its meaning but my query is , if the value inserted is really large then how it got successful in the first attempt.

    Read the article

  • Calling a C function in a pro*C file

    - by Sachin Chourasiya
    I have these line in my pro*C program. The function initAerage is defined in a C language and I am trying to call this function in a .pcc (pro C++) file. I am getting an error Error: initAverage(int i);was declared before with a different language extern "C" { int initAverage(int i); } Please help

    Read the article

  • shmat() sending signal 11

    - by Sachin Chourasiya
    Please let me know when a call to shmat function can raise a signal 11. if ((shmId=shmget(shmKey, 0, 0)) <= 0) { printf( "shmget(0x%x)", shmKey); return 0; } printf( "queueOpen - Key 0x%x gives ID %d", shmKey, shmId); qh = shmat(shmId, 0, SHM_RND); I am getting a signal 11 by the code above. Please help

    Read the article

  • How \Deleted flag can be unset for all mails in cyrus-imapd mailbox?

    - by Sachin Divekar
    I have a 5GB mailbox which I moved using imapsync. But somehow I messed up with --delete/--delete2 option and end up with almost all the messages having \Deleted flag set. I do not have delayed expunge enabled, so I can not use unexpunge utility. I am using cyrus-imapd v2.3.7. Using cyrus-imapd's debugging feature I found out that email client(Roundcube in my case) fires following IMAP command to unset it. UID STORE 179 -FLAGS.SILENT (\Deleted) I don't know if somehow I can fire this command for all the mails. Is there any way I can unset \Deleted flag for all the mails in the mailbox? UPDATE: Using @geekosaur's tip of specifying range of message-ids in the above command, I could solve it for one mailbox under INBOX like INBOX.folder1. Is there any way I can do it for multiple mailboxes under INBOX recursively? Now I am working on solving it using/creating some script, maybe using Perl's IMAP related module. But still I need to solve it asap so inputs are welcome.

    Read the article

  • Site stopped working after adding NIC card

    - by Sachin Kainth
    My boss made a bit of blunder yesterday, he added a secondary NIC card to the a machine hosting a website so that it could be part of the local network. He also added it to the <blah>.local domain (which all our servers are being added too). The website failed following this. He thought this was because the machine was now called <blahblah>.<blah>.local, so he removed it from the domain and restarted. Same problem a asp.net error, something to do with a binding error. Sorry he didn’t make a note of it. He traced it back to the WCF services that are running on the site. Anyway, it looks like ASP.NET gets confused connecting to the database when there’s multiple network cards. The 173.x.x.x IP address (which is internal), doesn’t route to the internet.. Therefore it’s trying to connect via the wrong network. Any ideas about how to resolve it?

    Read the article

  • How to detect a background program (in Windows 7) which takes active focus automatically?

    - by Sachin Shekhar
    A background process/program steals focus from my currently active application. It disturbs me a lot when I type in an app or control an app using keyboard or play online flash games in full-screen. I want to remove this program from my PC, but I'm unable to detect it. I've analyzed all processes & scanned for viruses. All things are right from this side. I don't want to change focus behavior using registry tweak. Please, help me detecting that app..

    Read the article

  • Share PC over network

    - by Sachin Verma
    I have a server installed on one local Win7 machine (say as 192.168.2.14:8080/myAPP) and I want to access that server from different computer (say ip as 192.168.2.16). Even they are connected to same network I can't access server from other computer. I guess the problem is in firewall. This is working when I disable firewall and not working when I allow certain ports in windows firewall but keeping firewall on (As a rule to allow incoming connections).

    Read the article

  • Not able to output to file in the Windows command line

    - by Sachin
    In the following code, I need to take the path and size of folder and subfolders into a file. But when the loop runs for the second time, path and size are not getting printed to the file. size.txt only contains the path and size of the 1st folder. Please somebody help me. @echo off SETLOCAL EnableDelayedExpansion SET xsummary= SET xsize= for /f "tokens=1,2 delims=C" %%i IN ('"dir /s /-c /a | find "Directory""') do (echo C%%j >> abcd.txt) for /f "tokens=*" %%q IN (abcd.txt) do ( cd "%%q" For /F "tokens=*" %%h IN ('"dir /s /-c /a | find "bytes" | find /v "free""') do Set xsummary=%%h For /f "tokens=1,2 delims=)" %%a in ("!xsummary!") do set xsize=%%b Set xsize=!xsize:bytes=! Set xsize=!xsize: =! echo.%%q >> size.txt echo.!xsize! >> size.txt )

    Read the article

  • Default maximum heap size -- Ubuntu 10.04 LTS, openjdk6-jre

    - by sachin
    I just installed openjdk6-jre on Ubuntu 10.04 java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.2) (6b20-1.9.2-0ubuntu1~10.04.1) OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode) Every time I run "java" I get this error: Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. This can be solved by specifying a maximum heap size and running "java -Xmx256m" But is there anyway to permanently fix this error (i.e. set the default heap size to 256MB so that I do not need to specify the max heap size every time I run the command)

    Read the article

  • How to include duplicate values when setting environmental variable SET in dos

    - by Sachin
    I am trying to get the values from a file which has duplilcates also. But while setting the values in environmental variable SET, it is not considering the duplicate values. I am using below code: for /f "tokens=1,2 delims=@" %%a in (test.txt) do ( set size=............%%b call set %%size:~-12%%=%%a ) for /f %%a in ('set .') do >>outfile.txt echo %%a Format of test.txt: "C\ab"@12345678 "C\ab\we"@345678905 "C\ad\df"@345678905

    Read the article

  • SQL SERVER – Introduction to SQL Server 2014 In-Memory OLTP

    - by Pinal Dave
    In SQL Server 2014 Microsoft has introduced a new database engine component called In-Memory OLTP aka project “Hekaton” which is fully integrated into the SQL Server Database Engine. It is optimized for OLTP workloads accessing memory resident data. In-memory OLTP helps us create memory optimized tables which in turn offer significant performance improvement for our typical OLTP workload. The main objective of memory optimized table is to ensure that highly transactional tables could live in memory and remain in memory forever without even losing out a single record. The most significant part is that it still supports majority of our Transact-SQL statement. Transact-SQL stored procedures can be compiled to machine code for further performance improvements on memory-optimized tables. This engine is designed to ensure higher concurrency and minimal blocking. In-Memory OLTP alleviates the issue of locking, using a new type of multi-version optimistic concurrency control. It also substantially reduces waiting for log writes by generating far less log data and needing fewer log writes. Points to remember Memory-optimized tables refer to tables using the new data structures and key words added as part of In-Memory OLTP. Disk-based tables refer to your normal tables which we used to create in SQL Server since its inception. These tables use a fixed size 8 KB pages that need to be read from and written to disk as a unit. Natively compiled stored procedures refer to an object Type which is new and is supported by in-memory OLTP engine which convert it into machine code, which can further improve the data access performance for memory –optimized tables. Natively compiled stored procedures can only reference memory-optimized tables, they can’t be used to reference any disk –based table. Interpreted Transact-SQL stored procedures, which is what SQL Server has always used. Cross-container transactions refer to transactions that reference both memory-optimized tables and disk-based tables. Interop refers to interpreted Transact-SQL that references memory-optimized tables. Using In-Memory OLTP In-Memory OLTP engine has been available as part of SQL Server 2014 since June 2013 CTPs. Installation of In-Memory OLTP is part of the SQL Server setup application. The In-Memory OLTP components can only be installed with a 64-bit edition of SQL Server 2014 hence they are not available with 32-bit editions. Creating Databases Any database that will store memory-optimized tables must have a MEMORY_OPTIMIZED_DATA filegroup. This filegroup is specifically designed to store the checkpoint files needed by SQL Server to recover the memory-optimized tables, and although the syntax for creating the filegroup is almost the same as for creating a regular filestream filegroup, it must also specify the option CONTAINS MEMORY_OPTIMIZED_DATA. Here is an example of a CREATE DATABASE statement for a database that can support memory-optimized tables: CREATE DATABASE InMemoryDB ON PRIMARY(NAME = [InMemoryDB_data], FILENAME = 'D:\data\InMemoryDB_data.mdf', size=500MB), FILEGROUP [SampleDB_mod_fg] CONTAINS MEMORY_OPTIMIZED_DATA (NAME = [InMemoryDB_mod_dir], FILENAME = 'S:\data\InMemoryDB_mod_dir'), (NAME = [InMemoryDB_mod_dir], FILENAME = 'R:\data\InMemoryDB_mod_dir') LOG ON (name = [SampleDB_log], Filename='L:\log\InMemoryDB_log.ldf', size=500MB) COLLATE Latin1_General_100_BIN2; Above example code creates files on three different drives (D:  S: and R:) for the data files and in memory storage so if you would like to run this code kindly change the drive and folder locations as per your convenience. Also notice that binary collation was specified as Windows (non-SQL). BIN2 collation is the only collation support at this point for any indexes on memory optimized tables. It is also possible to add a MEMORY_OPTIMIZED_DATA file group to an existing database, use the below command to achieve the same. ALTER DATABASE AdventureWorks2012 ADD FILEGROUP hekaton_mod CONTAINS MEMORY_OPTIMIZED_DATA; GO ALTER DATABASE AdventureWorks2012 ADD FILE (NAME='hekaton_mod', FILENAME='S:\data\hekaton_mod') TO FILEGROUP hekaton_mod; GO Creating Tables There is no major syntactical difference between creating a disk based table or a memory –optimized table but yes there are a few restrictions and a few new essential extensions. Essentially any memory-optimized table should use the MEMORY_OPTIMIZED = ON clause as shown in the Create Table query example. DURABILITY clause (SCHEMA_AND_DATA or SCHEMA_ONLY) Memory-optimized table should always be defined with a DURABILITY value which can be either SCHEMA_AND_DATA or  SCHEMA_ONLY the former being the default. A memory-optimized table defined with DURABILITY=SCHEMA_ONLY will not persist the data to disk which means the data durability is compromised whereas DURABILITY= SCHEMA_AND_DATA ensures that data is also persisted along with the schema. Indexing Memory Optimized Table A memory-optimized table must always have an index for all tables created with DURABILITY= SCHEMA_AND_DATA and this can be achieved by declaring a PRIMARY KEY Constraint at the time of creating a table. The following example shows a PRIMARY KEY index created as a HASH index, for which a bucket count must also be specified. CREATE TABLE Mem_Table ( [Name] VARCHAR(32) NOT NULL PRIMARY KEY NONCLUSTERED HASH WITH (BUCKET_COUNT = 100000), [City] VARCHAR(32) NULL, [State_Province] VARCHAR(32) NULL, [LastModified] DATETIME NOT NULL, ) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA); Now as you can see in the above query example we have used the clause MEMORY_OPTIMIZED = ON to make sure that it is considered as a memory optimized table and not just a normal table and also used the DURABILITY Clause= SCHEMA_AND_DATA which means it will persist data along with metadata and also you can notice this table has a PRIMARY KEY mentioned upfront which is also a mandatory clause for memory-optimized tables. We will talk more about HASH Indexes and BUCKET_COUNT in later articles on this topic which will be focusing more on Row and Index storage on Memory-Optimized tables. So stay tuned for that as well. Now as we covered the basics of Memory Optimized tables and understood the key things to remember while using memory optimized tables, let’s explore more using examples to understand the Performance gains using memory-optimized tables. I will be using the database which i created earlier in this article i.e. InMemoryDB in the below Demo Exercise. USE InMemoryDB GO -- Creating a disk based table CREATE TABLE dbo.Disktable ( Id INT IDENTITY, Name CHAR(40) ) GO CREATE NONCLUSTERED INDEX IX_ID ON dbo.Disktable (Id) GO -- Creating a memory optimized table with similar structure and DURABILITY = SCHEMA_AND_DATA CREATE TABLE dbo.Memorytable_durable ( Id INT NOT NULL PRIMARY KEY NONCLUSTERED Hash WITH (bucket_count =1000000), Name CHAR(40) ) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA) GO -- Creating an another memory optimized table with similar structure but DURABILITY = SCHEMA_Only CREATE TABLE dbo.Memorytable_nondurable ( Id INT NOT NULL PRIMARY KEY NONCLUSTERED Hash WITH (bucket_count =1000000), Name CHAR(40) ) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_only) GO -- Now insert 100000 records in dbo.Disktable and observe the Time Taken DECLARE @i_t bigint SET @i_t =1 WHILE @i_t<= 100000 BEGIN INSERT INTO dbo.Disktable(Name) VALUES('sachin' + CONVERT(VARCHAR,@i_t)) SET @i_t+=1 END -- Do the same inserts for Memory table dbo.Memorytable_durable and observe the Time Taken DECLARE @i_t bigint SET @i_t =1 WHILE @i_t<= 100000 BEGIN INSERT INTO dbo.Memorytable_durable VALUES(@i_t, 'sachin' + CONVERT(VARCHAR,@i_t)) SET @i_t+=1 END -- Now finally do the same inserts for Memory table dbo.Memorytable_nondurable and observe the Time Taken DECLARE @i_t bigint SET @i_t =1 WHILE @i_t<= 100000 BEGIN INSERT INTO dbo.Memorytable_nondurable VALUES(@i_t, 'sachin' + CONVERT(VARCHAR,@i_t)) SET @i_t+=1 END The above 3 Inserts took 1.20 minutes, 54 secs, and 2 secs respectively to insert 100000 records on my machine with 8 Gb RAM. This proves the point that memory-optimized tables can definitely help businesses achieve better performance for their highly transactional business table and memory- optimized tables with Durability SCHEMA_ONLY is even faster as it does not bother persisting its data to disk which makes it supremely fast. Koenig Solutions is one of the few organizations which offer IT training on SQL Server 2014 and all its updates. Now, I leave the decision on using memory_Optimized tables on you, I hope you like this article and it helped you understand  the fundamentals of IN-Memory OLTP . Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: PostADay, SQL, SQL Authority, SQL Performance, SQL Query, SQL Server, SQL Tips and Tricks, T SQL Tagged: Koenig

    Read the article

  • Grant Showplan : MS SQL Server 2005

    SQL version applied to: 2005 Grant Showplan The SHOWPLAN permission only governs who can run the various SET SHOWPLAN statements. There is no impact on performance of this. And with some of the SHOWPLAN statement in effect, the statement(s) is not executed and goes through compilation phase only.  read moreBy Sachin DiwakerDid you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Jqgrid set cell background color

    - by sachin
    In "Custom data tooltips in jqGrid 3.4" discussion, came to know how to use setcell to change the color of the text inside a cell of jqgrid. How can we change the background color of the cell? Tried the following jQuery("#list").setCell (row,col,'',{ background-color:'red'}) jQuery("#list").setCell (row,col,'','',{ bgcolor:'red'} Thanks.

    Read the article

  • Creating Custom Assertions in Oracle Web service Manager (OWSM)

    - by sachin
    I am trying to create example given at this site: http://download.oracle.com/docs/cd/E12839_01/web.1111/b32511/custom_assertions.htm#CIHFGJAG but While compiling I get following errors: Error(63,64): cannot access oracle.annotation.logging.Publish Error: error: in class file D:\Installations\Oracle\Middleware_11g\oracle_common\modules\oracle.wsm.common_11.1.1\wsm-policy-core.jar/oracle/wsm/resources/enforcement/EnforcementMessageID.class: unknown enum constant oracle.annotation.logging.Publish.NO Error(69,28): cannot access oracle.annotation.logging.Category Error(70,48): cannot find variable FAULT_FAILED_CHECK Error(75,17): cannot access oracle.annotation.logging.Severity I have included: wsm-policy-core.jar, wsm-agent-core.jar findjars.com shows oracle.annotation.logging.Publish present in: logging-utils.jar I downloaded latest oc4j, but still not able to find this jar or resolve the issue. Please help!

    Read the article

  • DataContractSerializer does not properly deserialize, values for methods in object are missing

    - by sachin
    My SomeClass [Serializable] [DataContract(Namespace = "")] public class SomeClass { [DataMember] public string FirstName { get; set; } [DataMember] public string LastName { get; set; } [DataMember] private IDictionary<long, string> customValues; public IDictionary<long, string> CustomValues { get { return customValues; } set { customValues = value; } } } My XML File: <?xml version="1.0" encoding="UTF-8"?> <SomeClass> <FirstName>John</FirstName> <LastName>Smith</LastName> <CustomValues> <Value1>One</Value1> <Value2>Two</Value2> </CustomValues > </SomeClass> But my problem is for the class, i am only getting some of the data for my methods when i deserialize. var xmlRoot = XElement.Load(new StreamReader( filterContext.HttpContext.Request.InputStream, filterContext.HttpContext.Request.ContentEncoding)); XmlDictionaryReader reader = XmlDictionaryReader.CreateDictionaryReader(xmlRoot.CreateReader()); DataContractSerializer ser = new DataContractSerializer(typeof(SomeClass)); //Deserialize the data and read it from the instance. SomeClass someClass = (SomeClass)ser.ReadObject(reader, true); So when I check "someClass", FirstName will have the value john, But the LastName will be null. Mystery is how can i get some of the data and not all of the data for the class. So DataContractSerializer is not pulling up all the data from xml when deserializing. Am i doing something wrong. Any help is appreciated. Thanks in advance. Let me know if anyone has the same problem or any one has solution

    Read the article

  • System Out Of Memory Exception in Production Server

    - by Sachin Gupta
    We have .net application installed on production server. It is using .net FrameWork 3.0 on windows server 2003 with RAM 4 GB. But there is a problem in application while running sometimes it throws system out of memory exception. I am very frustrating with this. Also I am unable to simulate the issue. I had checked all the possibilities which can cause the problem but didn’t get any thing which solve the issue I checked on production server event log found the Out Of Memory Exception also INVALID VIEW STATE logs are there. Look at the following event log which may help to find solutions. Exception information: Exception type: HttpException Exception message: Invalid viewstate. Request information: Request path: /zContest/ScriptResource.axd User: LisaA Is authenticated: True Authentication Type: Forms Thread information: Thread ID: 10 Is impersonating: True Stack trace: at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType) at System.Web.UI.Page.DecryptString(String s) at System.Web.Handlers.ScriptResourceHandler.DecryptParameter(NameValueCollection queryString) at System.Web.Handlers.ScriptResourceHandler.ProcessRequestInternal(HttpResponse response, NameValueCollection queryString, VirtualFileReader fileReader) at System.Web.Handlers.ScriptResourceHandler.ProcessRequest(HttpContext context) at System.Web.Handlers.ScriptResourceHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------ Event code: 3005 Event message: An unhandled exception has occurred. Process information: Process ID: 5388 Process name: w3wp.exe Exception information: Exception type: OutOfMemoryException Exception message: Exception of type 'System.OutOfMemoryException' was thrown. ------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------ Please help me out on this

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >