public inbox for [email protected]  
help / color / mirror / Atom feed
Re: AI for query-planning?
2+ messages / 2 participants
[nested] [flat]

* Re: AI for query-planning?
@ 2024-06-22 14:40 Adrian Klaver <[email protected]>
  2024-06-22 15:23 ` Re: AI for query-planning? Pyrote <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Adrian Klaver @ 2024-06-22 14:40 UTC (permalink / raw)
  To: Andreas Joseph Krogh <[email protected]>; pgsql-general

On 6/22/24 04:50, Andreas Joseph Krogh wrote:
> Hi, are there any plans for using some kind of AI for query-planning?
> 
> Can someone with more knowledge about this than I have please explain 
> why it might, or not, be a good idea, and what the challenges are?

1) Require large amount of resources.

2) Produce high rate of incorrect answers.


> 
> Thanks.
> 
> --
> *Andreas Joseph Krogh*
> CTO / Partner - Visena AS
> Mobile: +47 909 56 963
> [email protected] <mailto:[email protected]>
> www.visena.com <https://www.visena.com;
> <https://www.visena.com;

-- 
Adrian Klaver
[email protected]







^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: AI for query-planning?
  2024-06-22 14:40 Re: AI for query-planning? Adrian Klaver <[email protected]>
@ 2024-06-22 15:23 ` Pyrote <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Pyrote @ 2024-06-22 15:23 UTC (permalink / raw)
  To: pgsql-general

<div dir="auto">The current forms of “AI” have no concept of state or long term memory. On each invocation of the AI you have to tell it,</div><div dir="auto"><br></div><div dir="auto">This is a Postgres database.</div><div dir="auto"><br></div><div dir="auto">This is my database schema.</div><div dir="auto"><br></div><div dir="auto">These are the indexes I have.</div><div dir="auto"><br></div><div dir="auto">After providing that information the “AI” “might” generate a valid query for your particular database but it won’t be optimum. The AI doesn’t know how many rows are in each table, the physical media each table is on, or any other attributes about your database that would be used to calculate the cost of using an index or a table scan.</div><div dir="auto"><br></div><div dir="auto">So then you could make the jump that an “AI” should be ran locally and trained exclusively on your database. Now you are using a general purpose “AI” algorithm for a very specific task which would not be optimum. It would require constant retraining which would be computationally expensive.&nbsp;</div><div dir="auto"><br></div><div dir="auto">Then let’s say you want to write an “AI” algorithm just for Postgres. Now you have basically rewritten the current Postgres Optimizer in a round about way.&nbsp;</div><div dir="auto"><br></div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 22, 2024 at 09:40 Adrian Klaver &lt;[email protected]&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On 6/22/24 04:50, Andreas Joseph Krogh wrote:
<br>&gt; Hi, are there any plans for using some kind of AI for query-planning?
<br>&gt; 
<br>&gt; Can someone with more knowledge about this than I have please explain 
<br>&gt; why it might, or not, be a good idea, and what the challenges are?
<br>
<br>1) Require large amount of resources.
<br>
<br>2) Produce high rate of incorrect answers.
<br>
<br>
<br>&gt; 
<br>&gt; Thanks.
<br>&gt; 
<br>&gt; --
<br>&gt; *Andreas Joseph Krogh*
<br>&gt; CTO / Partner - Visena AS
<br>&gt; Mobile: +47 909 56 963
<br>&gt; [email protected] &lt;mailto:[email protected]&gt;
<br>&gt; www.visena.com &lt;https://www.visena.com&gt;
<br>&gt; &lt;https://www.visena.com&gt;
<br>
<br>-- 
<br>Adrian Klaver
<br>[email protected]
<br>
<br>
<br>
<br></blockquote></div></div>

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-06-22 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-06-22 14:40 Re: AI for query-planning? Adrian Klaver <[email protected]>
2024-06-22 15:23 ` Pyrote <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox