01-29-2019
A question: can you not place your data temporarily in a file and use command line tools to get your answer, since the query runs for potentially a very long time? What table contains "data"? Then you can use a subquery.
Plus, having been an admin and system programmer for a long time I would commend code like this to help from a very senior techie. Quadratic time queries may have system wide impacts that affect other processes and users. This is a polite way of me saying if you did this you would incur the wrath of a lot of people. Just saying. If it is your desktop, okay, maybe.
8 More Discussions You Might Find Interesting
1. Programming
Hi there,
I have a hierarchical database that include 4 tables. Table A is the parent of B, B is Parent of C, C is parent of D. If I want to query everything in D that is associated with A.name, how do I do that? Thanks!
YanYan (0 Replies)
Discussion started by: pinkgladiator
0 Replies
2. Shell Programming and Scripting
Hi there, I have a table that stores multiple records for many different servers, each of which is timestamped ... I wanted to write a query that would enable me to only output the "latest" record (based on timestamp) for each "unique" server. So for example my main table looks like this
... (3 Replies)
Discussion started by: hcclnoodles
3 Replies
3. Web Development
hello all
i have 2 columns every column in the following format
column1
2011-04-01 11:39:54
column2
2019-02-03 00:00:00
i want get difference between above data as following
2 days 11:39
how to do so ?
i tried many functions but nothing works
please advice what is the query... (6 Replies)
Discussion started by: mogabr
6 Replies
4. Shell Programming and Scripting
Hi,
I want to access mysql query from database , for that i have tried the below code
#! /bin/bash
TABLE_NAME=database1
USER_NAME=root
IP_ADDR=111.20.9.256
somevar=`echo "select altid from alert where altid='2724'"| mysql -h $IP_ADDR -u $USER_NAME $TABLE_NAME `
echo $somevar
... (1 Reply)
Discussion started by: aish11
1 Replies
5. Programming
Hi,
I want to run below query on shellscript but having one problm.
ADV=$( mysql -h "$IP_ADDR" -u "$USER_NAME" "$TABLE_NAME" -BNe" SELECT ADV FROM indata where inid='$INSTRUID' and Date='$latest Date';" )
here Date column contans different below dates
2011-12-01... (0 Replies)
Discussion started by: aish11
0 Replies
6. Shell Programming and Scripting
Hi,
I want to run below query on shellscript but having one problm.
ADV=$( mysql -h "$IP_ADDR" -u "$USER_NAME" "$TABLE_NAME" -BNe" SELECT ADV FROM indata where inid='$INSTRUID' and Date='$latest Date';" )
here Date column contans different below dates
2011-12-01... (11 Replies)
Discussion started by: aish11
11 Replies
7. Programming
Hello
i have created mysql query to compare to values and get difference in percentage
as following:
SELECT file_name, 100 - ((100 * (SELECT file_count FROM xipi_files z WHERE x.file_group = z.file_group AND x.file_name = z.file_name AND z.insert_date = CURDATE( ) - INTERVAL 1 DAY)) /... (1 Reply)
Discussion started by: mogabr
1 Replies
8. Programming
Hi All,
i have a table in mysql with the following data
Table name Test
Assettype Serial_No Status location
Mouse 123456 In Stock chennai
Mouse 98765 Allocated chennai
Keyboard ... (2 Replies)
Discussion started by: venkitesh
2 Replies
RTFM(1) General Commands Manual RTFM(1)
NAME
rtfm - a response for easy questions from clueless lusers
SYNOPSIS
rtfm [ -p ] [ -h ] [ -d option ] [ -i interval ] [ -a action ] [ -q luser]
DESCRIPTION
rtfm is a command for system administrators to use in dealing with new users. rtfm is useful for dealing with users having trouble with
their pictures downloaded from alt.binaries.pictures.erotica. rtfm will continue to run until killed by hand, using `kill processid'.
rtfm can be invoked by anyone who has enough of a clue to know what a man page is.
OPTIONS
-p Give the answer in a polite fashion.
-h Tell the clueless luser to go to hell. Used with the -p option, they'll look forward to the trip.
-d option
Debug mode using option where option is one of the following:
query Ask the luser what part of rtfm that he or she does not understand.
planet Ask what planet the luser is from.
literacy Ask the luser if the luser can read.
english Ask the luser if the luser understands English.
Mac Ask the luser if the luser has ever used a computer other than a Macintosh.
Nintendo Same as the Mac option, but slightly more harsh.
-i interval
Enable within interval seconds. interval is the time between a luser asking the same damn fool question. This option must be acti-
vated for the -a option. It stores the time of the question in /var/run/luser and checks that file each time that rtfm is activated.
interval is a number of minutes, of the form xxx.xx where each x is a decimal digit. The default is 5.00 minutes.
-a action
This defines some action to be taken in the event that the -i flag condition is met. action can be defined either at the flag level
or by a file. The options for flags are as follows:
scream Let out a scream of utter frustration.
hair Rip out your hair in total frustration.
rm Automatic command ran in lusers home directory. It can have an addition -rf flag added.
ignore Ignore the luser.
warn Warn the other sysadmins.
forward Forward to CNS advising. Particullary if the complaint is /dev/null is full.
kill Kill all the lusers processes.
FILE=file.name Use a file to define a course of actions. This can be any executeable file except those using ksh, which no god-fear-
ing right-thinking sysadmin would be caught using lest he be struck down by the wrath of God.
-q luser
Query file /etc/luser to see if luser is a real luser or a first time luser.
FILES
/etc/luser
SEE ALSO
mr.biff(2),
BUGS
rtfm only checks /var/run/luser when the -a option is specified and after the -i option is invoked. Otherwise /tmp would fill up rapidly on
many systems. Also, core may dump if the -a FILE= option is anatomically impossible.
GNU Utilities July 27, 1997 RTFM(1)