I am running vaccum analyze on a table but deadtuples are increasing?

|
MasterZiv 2020-08-11 11:24:28
@A1432240210 please provide detailed information in form of text.
MasterZiv 2020-08-11 11:26:11
MasterZiv 2020-08-11 11:24:28
@A1432240210 please provide detailed information in form of text.

Also, provide problem information related to DBMS, not to the client language

B1432240210 2020-08-11 11:28:08
MasterZiv 2020-08-11 11:24:28
@A1432240210 please provide detailed information in form of text.

“You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘studentdata1 where id=%s’ at line 1”)

MasterZiv 2020-08-11 11:29:38
B1432240210 2020-08-11 11:28:08
“You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘studentdata1 where id=%s’ at line 1”)

Provide full SQL query text

MasterZiv 2020-08-11 11:31:07
B1432240210 2020-08-11 11:28:08
“You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘studentdata1 where id=%s’ at line 1”)

But %s shouldn’t appear in the quiery, apparently, it must have been substituted with some quiery parameter

B1432240210 2020-08-11 11:32:29
okay
B1432240210 2020-08-11 11:32:50
def deletestudent():
cc = studenmttable.focus()
content = studenmttable.item(cc)
pp = content[“values”][0]
strr = “delete form studentdata1 where id=%s ”
mycursor.execute(strr,(pp))
con.commit()
messagebox.showinfo(“Notification”,”Id: {} deleted successfully “.format(pp))
strr = “select *from studentdata1”
mycursor.execute(strr,(id))
datas = mycursor.fetchall()
studenmttable.delete(*studenmttable.get_children())
for i in datas:
vv = [i[0], i[1], i[2], i[3], i[4], i[5], i[6], i[7], i[8]]
studenmttable.insert(“”, END, values=vv)
MasterZiv 2020-08-11 11:33:37
B1432240210 2020-08-11 11:32:50
def deletestudent():
cc = studenmttable.focus()
content = studenmttable.item(cc)
pp = content[“values”][0]
strr = “delete form studentdata1 where id=%s ”
mycursor.execute(strr,(pp))
con.commit()
messagebox.showinfo(“Notification”,”Id: {} deleted successfully “.format(pp))
strr = “select *from studentdata1”
mycursor.execute(strr,(id))
datas = mycursor.fetchall()
studenmttable.delete(*studenmttable.get_children())
for i in datas:
vv = [i[0], i[1], i[2], i[3], i[4], i[5], i[6], i[7], i[8]]
studenmttable.insert(“”, END, values=vv)

This is python code, will not do

MasterZiv 2020-08-11 11:34:32
B1432240210 2020-08-11 11:32:50
def deletestudent():
cc = studenmttable.focus()
content = studenmttable.item(cc)
pp = content[“values”][0]
strr = “delete form studentdata1 where id=%s ”
mycursor.execute(strr,(pp))
con.commit()
messagebox.showinfo(“Notification”,”Id: {} deleted successfully “.format(pp))
strr = “select *from studentdata1”
mycursor.execute(strr,(id))
datas = mycursor.fetchall()
studenmttable.delete(*studenmttable.get_children())
for i in datas:
vv = [i[0], i[1], i[2], i[3], i[4], i[5], i[6], i[7], i[8]]
studenmttable.insert(“”, END, values=vv)

FORM –> FROM

B1432240210 2020-08-11 11:34:41
error is showing in that sql strr = “delete form studentdata1 where id=%s ”
MasterZiv 2020-08-11 11:35:01
B1432240210 2020-08-11 11:34:41
error is showing in that sql strr = “delete form studentdata1 where id=%s “

Form -> from

B1432240210 2020-08-11 11:35:11
okay
piterden 2020-08-12 17:02:22
How to make it if columns have the same names?
MasterZiv 2020-08-12 18:38:02
Column names do not matter in the foreign key constraint. You can use any names, different or same
Ganesh 2020-08-13 21:48:00
Hi All,
I am running vaccum analyze on a table but deadtuples are increasing ? What could be the reason?
Deb_575 2020-08-13 22:05:08
Ganesh 2020-08-13 21:48:00
Hi All,
I am running vaccum analyze on a table but deadtuples are increasing ? What could be the reason?

Wrong grp bro, vacuum analyze is a PostgreSQL thing. Hope someone will be able to ans in this if aware of it

Flute 2020-08-13 22:06:56
Can you check the before and after count
MasterZiv 2020-08-14 00:07:31
Ganesh 2020-08-13 21:48:00
Hi All,
I am running vaccum analyze on a table but deadtuples are increasing ? What could be the reason?

Intensive delete our update transactions

2020-08-14 08:40:23
Is it possible to autoscale the google managed SQL as it is possible for compute engine, my intention was to create read replications automatically if the database response time is too slow because of too much requests. So to activate and deactivate as many read replicas as needed.
MasterZiv 2020-08-14 08:56:52
2020-08-14 08:40:23
Is it possible to autoscale the google managed SQL as it is possible for compute engine, my intention was to create read replications automatically if the database response time is too slow because of too much requests. So to activate and deactivate as many read replicas as needed.

What is Google managed SQL?

2020-08-14 10:03:28
MySQL in Google Cloud
MasterZiv 2020-08-14 10:13:25
2020-08-14 08:40:23
Is it possible to autoscale the google managed SQL as it is possible for compute engine, my intention was to create read replications automatically if the database response time is too slow because of too much requests. So to activate and deactivate as many read replicas as needed.

I doubt very much this can be done automatically.

MasterZiv 2020-08-14 10:15:00
Maybe someone will answer exactly
drfibonacci 2020-08-14 11:40:50
Hi all
drfibonacci 2020-08-14 11:41:33
I am trying to use ‘s’ in REGEXP in MariaDB but its not matching
drfibonacci 2020-08-14 11:41:45
Is it because MariaDB is PCRE compliant?
piterden 2020-08-14 11:42:05
Use [[:space:]]
drfibonacci 2020-08-14 11:42:22
Okayy
piterden 2020-08-14 11:43:05
Read the reference more detailed
drfibonacci 2020-08-14 11:44:12
Spasiba 😀
There’s another option of using [[:blank:]] too I saw
drfibonacci 2020-08-14 11:44:40
space char class matches newline and whitespaces it seems
drfibonacci 2020-08-14 11:44:53
Is Mysql POSIX compliant or PCRE?
MasterZiv 2020-08-14 13:02:12
drfibonacci 2020-08-14 11:44:53
Is Mysql POSIX compliant or PCRE?

the implementation is libPCRE, but it supports POSIX.
There are flags that tune this.

Professor_Mi 2020-08-14 18:02:50
How to search MySQL database rows which has comma(,) seperated values. Like: red, gree, black. I want to show results when a particular color is searched like red. Currently I am only able to fetch rows which has single values not comma separated values
Professor_Mi 2020-08-14 18:03:40
FIND_IN_SET is something I found but no luck with this
drfibonacci 2020-08-14 18:50:00
Professor_Mi 2020-08-14 18:03:40
FIND_IN_SET is something I found but no luck with this

Use regex?

drfibonacci 2020-08-14 18:51:21
You must be getting the search parameters – say for example “red”

SELECT colors FROM Colors WHERE REGEXP “<search parameter>”;

drfibonacci 2020-08-14 18:52:55
You can also use json to store those particular values instead;
The advantage would be using arrays to store these values
Professor_Mi 2020-08-14 18:55:38
drfibonacci 2020-08-14 18:50:00
Use regex?

Thanks I will try it

MasterZiv 2020-08-14 23:10:05
Professor_Mi 2020-08-14 18:02:50
How to search MySQL database rows which has comma(,) seperated values. Like: red, gree, black. I want to show results when a particular color is searched like red. Currently I am only able to fetch rows which has single values not comma separated values

Actually, you should split this into master-detail pair of tables.

Without this any search solution will not work fast so in the production environment this will not work if you have large table.

MasterZiv 2020-08-14 23:13:25
Professor_Mi 2020-08-14 18:02:50
How to search MySQL database rows which has comma(,) seperated values. Like: red, gree, black. I want to show results when a particular color is searched like red. Currently I am only able to fetch rows which has single values not comma separated values

This is violation of 1st normal form, and it is a very harmful dressing mistake…

2020-08-14 23:36:05
I have a doubt in SQL programming Can anyone help?
SELECT id
FROM flights AS f
WHERE distance < (
SELECT AVG(distance)
FROM flights
WHERE carrier = f.carrier);
2020-08-14 23:36:18
2020-08-14 23:36:05
I have a doubt in SQL programming Can anyone help?
SELECT id
FROM flights AS f
WHERE distance < (
SELECT AVG(distance)
FROM flights
WHERE carrier = f.carrier);

can anyone explain why there is a need to put WHERE carrier = f.carrier statement

smlkw 2020-08-15 00:39:24
2020-08-14 23:36:18
can anyone explain why there is a need to put WHERE carrier = f.carrier statement

because you point to another table (even it’s the same table)

MasterZiv 2020-08-15 09:04:23
2020-08-14 23:36:18
can anyone explain why there is a need to put WHERE carrier = f.carrier statement

It’s strange question.
You supposingly should have some task to do and there should be some conditions.

If you remove this WHERE

SELECT id
FROM flights AS f
WHERE distance < (
SELECT AVG(distance)
FROM flights
);

you will get flights which distance is less then average distance of all flights

If you add this condition

SELECT id
FROM flights AS f
WHERE distance < (
SELECT AVG(distance)
FROM flights
WHERE carrier = f.carrier);

The ideas if the query changes,
You get flights which distance is less then average distance of flights of same carrier.

drfibonacci 2020-08-15 09:51:41
Hey I have a query regarding percentage calculation
drfibonacci 2020-08-15 09:52:01
Suppose I have this example table

Amount

25
30
35
40
56

drfibonacci 2020-08-15 09:52:53
I need to find a table after calculating the percent of each transaction on the total cash influx
drfibonacci 2020-08-15 09:53:48
So query should return

Amount Percent

25 25*100/(25+30+35+40+56)%

and so on

drfibonacci 2020-08-15 09:55:33
I was trying something like
Select Amount, Amount/SUM(Amount) FROM “table”

But it isn’t working

|