Search Results

Search found 4685 results on 188 pages for 'queries'.

Page 12/188 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How to log error queries in mysql?

    - by user271768
    I know that there is general_log that logs all queries, but I want to find out which query has an error, and get the error message. I have tried running an error query on purpose, but it logs as a normal query and doesn't report it with error. Any ideas?

    Read the article

  • Setting SQL Relationships For LINQ Queries

    - by Soo
    I have two tables that I'm trying to create a relationship between so I can write nice LINQ queries that don't require join. Widgets WidgetId WidgetDescription Orders OrderId WidgetId OrderDate What I want to be able to do is create a LINQ query that does something similar to: var result = from x in db.Widgets Where x.Orders.OrderDate == "5/11/2010" select x; I can't seem to get intellitext to pick up the other database despite creating a relationship in SQL server. Are there any additional steps I need to take to make this work?

    Read the article

  • How to test my Firebird SQL queries

    - by Bob
    I'm in the process of learning SQL, and I need a way of verifying that my SQL queries are valid (i.e. no syntax errors). I also would like to check what results they yield on a test database of my choosing and structure. I'm using embedded firebird in my C# .NET application, so I don't really have any tools to work with. Anyone have any tips? Perhaps there are SQL administrators/query IDEs out there that work with Firebird?

    Read the article

  • How to cache queries in EJB and return result efficient (performance POV)

    - by Maxym
    I use JBoss EJB 3.0 implementation (JBoss 4.2.3 server) At the beginning I created native query all the time using construction like Query query = entityManager.createNativeQuery("select * from _table_"); Of couse it is not that efficient, I performed some tests and found out that it really takes a lot of time... Then I found a better way to deal with it, to use annotation to define native queries: @NamedNativeQuery( name = "fetchData", value = "select * from _table_", resultClass=Entity.class ) and then just use it Query query = entityManager.createNamedQuery("fetchData"); the performance of code line above is two times better than where I started from, but still not that good as I expected... then I found that I can switch to Hibernate annotation for NamedNativeQuery (anyway, JBoss's implementation of EJB is based on Hibernate), and add one more thing: @NamedNativeQuery( name = "fetchData2", value = "select * from _table_", resultClass=Entity.class, readOnly=true) readOnly - marks whether the results are fetched in read-only mode or not. It sounds good, because at least in this case of mine I don't need to update data, I wanna just fetch it for report. When I started server to measure performance I noticed that query without readOnly=true (by default it is false) returns result with each iteration better and better, and at the same time another one (fetchData2) works like "stable" and with time difference between them is shorter and shorter, and after 5 iterations speed of both was almost the same... The questions are: 1) is there any other way to speed query using up? Seems that named queries should be prepared once, but I can't say it... In fact if to create query once and then just use it it would be better from performance point of view, but it is problematic to cache this object, because after creating query I can set parameters (when I use ":variable" in query), and it changes query object (isn't it?). well, is here any way to cache them? Or named query is the best option I can use? 2) any other approaches how to make results retrieveng faster. I mean, for instance I don't need those Entities to be attached, I won't update them, all I need is just fetch collection of data. Maybe readOnly is the only available way, so I can't speed it up, but who knows :) P.S. I don't ask about DB performance, all I need now is how not to create query all the time, so use it efficient, and to "allow" EJB to do less job with the same result concerning data returning.

    Read the article

  • Combining multiple queries in one in Access

    - by Arlen Beiler
    I have two queries that I want to combine into one in Microsoft Access 2003. SELECT AttendanceQuery.AttendDate, Count(*) AS Absent FROM AttendanceQuery WHERE (((AttendanceQuery.Present)=False)) GROUP BY AttendanceQuery.AttendDate; SELECT AttendanceQuery.AttendDate, Count(*) AS Enrollment FROM AttendanceQuery GROUP BY AttendanceQuery.AttendDate; The one shows the total records for each date, the other shows the ones that are marked absent.

    Read the article

  • ADOdv sanitizing queries

    - by pixel
    Just trying to make sure all my queries are sanitized. We're using ADOdb (it's already in place, so no talking me out of it). Is there something in ADOdb like mysql_real_escape_string?

    Read the article

  • How to kill locked mysql queries

    - by jcure
    Hi, I am creating and testing a mysql join query but each time so far it causes the database tables to lockup and the site hangs. I have to then call the host and they kill the locked queries. Is this something I can do from phpmyadmin so not to bother them while I tweak the script to work? Thanks for any reply.

    Read the article

  • Stored Queries?

    - by phpeffedup
    Is it considered crazy to store common SQL queries for my web app in a database for use in execution? Or is that common practice? Or is it impossible? My thinking is, this way, I avoid hard-coding SQL into my application files, and add another level of abstraction. Is this crazy? Is this what a stored procedure is? Or is that something else?

    Read the article

  • MySQL Non Index Queries Analysis

    - by Markii
    I'm using the log queries not using index but it logs all that use indexes but just more advanced or using IFs. Is there a parser or a program out there that can analyze the log and give me a literal output of saying "table.column should be a index" Thanks

    Read the article

  • Dynamically assembling SQL queries in Java

    - by kd
    What is the best way to assemble an SQL query with join conditions dynamically? I don't want to hard code the query for each different condition on a webpage or a set of webpages. Is it even feasible? I got as far as being able to assemble simple queries but i got stumped when i needed to insert join conditions, i.e. how to figure out dependencies for joins etc.

    Read the article

  • MySQL Queries using Doctrine & CodeIgniter

    - by 01010011
    Hi, How do I write plane SQL queries using Doctrine connection object and display the results? For example, how do I perform: SELECT * FROM table_name WHERE column_name LIKE '%anything_similar_to_this%'; using Doctrine something like this (this example does not work) $search_key = 'search_for_this'; $conn = Doctrine_Manager::connection(); $conn->execute('SELECT * FROM table_name WHERE column_name LIKE ?)', $search_key); echo $conn;

    Read the article

  • difference between where and nested queries

    - by Chris H
    I'm not able to figure out the difference between these queries. I'm pretty sure that the first one is an equi-join. I'm not sure how the second one ISN'T the same as the first. The sub query in #2 selects all Ids from S, and then it returns all R's that also have those ID's, no? SELECT R.cname FROM R, S, WHERE R.Id = S.Id SELECT R.cname FROM R WHERE R.Id IN (SELECT S.Id FROM S)

    Read the article

  • [ZF] How to use Zend_Db without SQL Queries?

    - by rasouza
    The last time I worked with Zend_Db I recall I used to write SQL Queries manually. I've been searching for some ORM application, but, since I read something like Zend_Db is also capable of doing so, I started to try it, but I can't find neither a good tutorial explain it or a good documentation. I read something lake Gateway pattern and ModelMapper class but I can't figure it out. Can someone shine my path? :P

    Read the article

  • Which of these queries is more efficient?

    - by Brian
    Which of these queries are more efficient? select 1 as newAndClosed from sysibm.sysdummy1 where exists ( select 1 from items where new = 1 ) and not exists ( select 1 from status where open = 1 ) select 1 as newAndClosed from items where new = 1 and not exists ( select 1 from status where open = 1 )

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >